22. Finding the Minimum of Two
Numbers
JavaScript
<!DOCTYPE html>
<html>
<head>
<title>Minimum
Number</title>
</head>
<body>
<script>
var num1 = 10;
var num2 = 5;
var minNum = Math.min(num1, num2);
document.write("The minimum number is:
" + minNum);
</script>
</body>
</html>
This finds the minimum value between
num1 and num2.
No comments:
Post a Comment