?? [m?ks] ??? [m?ks]

adv ??

?????? max() ??? ???

??: ??? ? ?? ? ? ? ?? ?? ??? ?????.

??: ??Math.max(x...)

????: x 0? ??? ?. ECMASCript v3 ???? ? ???? ????? ? ???????.?

???: ???? ? ???. ??? ??? -Infinity? ?????. ??? NaN??? ??? ??? ? ?? ??? ?? ?? ?? NaN? ?????.

?????? max() ??? ?

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script type="text/javascript">
//使用 max() 來返回指定數(shù)字中帶有最高值的數(shù)字
    document.write(Math.max(5,7) + "<br />")
    document.write(Math.max(-3,5) + "<br />")
    document.write(Math.max(-3,-5) + "<br />")
    document.write(Math.max(7.25,7.30))

</script>

</body>
</html>

???? ?? ?

??? ????? ??? "???? ??" ??? ?????