min
種類
メソッド
書式
Math.min(値1,値2)
解説
2つの値を比較し小さい値を返します。
サンプルコード
n = eval(prompt("Input Number",10));
alert(Math.min(n,5));
実際のスクリプトを
ダウンロード