Math.max
大きい方の値を得る
構文
Math.max(x,y)
引数
x=数値1, y=数値2例文
<html> <head> <title>Math.max</title> </head> <body> <!--大きい方の値を得るのサンプル--> <script type="text/javascript"> document.write('5と7で大きい方は'+Math.max(5,7)+"です<br>"); document.write('-3と5で大きい方は'+Math.max(-3,5)+"です<br>"); </script> </body> </html>
関連記事
- Math.tan
- Math.atan2
- Math.sqrt
- Math.sin
- Math.round
- Math.random
- Math.pow
- Math.min
- Math.log
- Math.floor
- Math.exp
- Math.cos
- Math.ceil
- Math.atan
- Math.asin
- Math.acos
- Math.abs
- Math.SQRT2
- Math.SQRT1_2
- Math.PI
- Math.LOG2E
- Math.LOG10E
- Math.LN2
- Math.LN10
- Math.E
スポンサーリンク