Use the if statement to output some text if 5 is greater than 2. - Javascript Statement

Javascript examples for Statement:Quiz

Description

Use the if statement to output some text if 5 is greater than 2.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p id="demo"></p>

<script>
if (5 > 2) {//from   w  w w . j a  v  a 2  s .c  o  m
    document.getElementById("demo").innerHTML = "Well done!";
}
</script>

</body>
</html>

Related Tutorials