<html>
<head>
<title>JavaScript Math max() Method</title>
</head>
<body>
<script type="text/javascript">
var maxvalue = Math.max(100, 200, -2, 1000);
document.write("First Test Value : " + maxvalue);
var maxvalue = Math.max(-4, -2, -50);
document.write("<br />Second Test Value : " + maxvalue);
var maxvalue = Math.max(0, -3);
document.write("<br />Third Test Value : " + maxvalue);
var maxvalue = Math.max(100);
document.write("<br />Fourth Test Value : " + maxvalue);
</script>
</body>
</html>