JavaScript If else Statements #Part 5

 JavaScript If else Statements #Part 5



         In this article we learn to if else Statements in JavaScript.

JavaScript Code

<script>

var a=20;

var b=20;

if(a==b)

{

document.write("True");

}

else

{

document.write("False")

}

</script>


If else Statements with alert Box

JavaScript Code

<script>

var a=20;

var b=2;

if(a==b)

{

alert("True");

}

else

{

alert("False")

}

</script>



Try it Yourself...

what you think about this article ??

Post a Comment

Previous Post Next Post