'Math' Example : Math « Javascript Objects « JavaScript Reference
- JavaScript Reference
- Javascript Objects
- Math
'Math' Example
<html>
<body>
<script language="javascript">
function function1(){
alert(Math.max(2, 4));
}
</script>
<button onclick="function1();">
Math function returns greater of 2 numbers (2 or 4)
</button>
</body>
</html>
Related examples in the same category