If Statement tutorial in JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>If Statement JavaScript</title>
<script>
var a = 100;
var b = 20;
var c = 50;
var d = 50;
var e = 70;
var f = "70";
if (a > b) {
document.write("A is Greater than B<br><br>");
}
if (c == d) {
document.write("C is Equal to D<br><br>");
}
if (e == f) {
document.write("E is Equal to F but E's data type is not equal to F's data type<br><br>");
}
if (e === f) {
document.write("E's data type is not equal to F's data type<br><br>");
}
</script>
</head>
<body>
</body>
</html>
.png)
.png)
.png)
.png)
.png)
.png)
Comments
Post a Comment