I need to know how to get the value of x after executing this variable:
x=1;
if(x<1)
{
x=2;
}else if (x>=1)
{
x=0;
}else{
x=3
}
I need to know how to get the value of x after executing this variable:
x=1;
if(x<1)
{
x=2;
}else if (x>=1)
{
x=0;
}else{
x=3
}
I have not noticed that your question belonged to javascript
Option 1
alert("Resultado de la variable:"+ x);
Option 2
document.getElementById("variable").innerHTML = x;
<p id="variable"></p>
Option 3
console.log(x);