Sunday, October 11, 2015

Javascript Tutorial For Beginners 5 # If...Else Statements and Compariso...

8:13 AM







<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Javascript IF ... ELSE</title>
<script type="text/javascript">
/*
== is equal to
=== equal value and equal type
!= is not equal to
!== not equal value or not equal type
> is greater than
< is less than
>= is greater than or equal to
<= is less than or equal to
*/
var age = 20;
if (age == 18) {
document.write("the age is == 18");
}
else if (age > 18) {

document.write("the age is > 18");
}
else {
document.write("the age is <= to 18");
}
</script>
</head>
<body>
</body>
</html>






OUTPUT


Written by

We are one of the initiators of the development of information technology in understanding the need for a solution that is familiar and close to us.

0 comments:

Post a Comment

 

© 2013 Klick Dev. All rights resevered.

Back To Top