JavaScriptで乱数を取得したい場合には「random関数」を使います。 Math.floor()は、小数点以下を切り捨てるメソッドです。0.999なら0、3.21なら3という数値を返します。
1、体力100のモンスターがいて、あなたはその敵を倒さないといけない 2、あなたの攻撃力は1回につき30以下、毎回ランダムで決定する 3、あなたの攻撃力の数値だけ、モンスターは体力を減らす 4、モンスターの体力が0以下になるまで、2と3を ...
The Math namespace object contains static properties and methods for mathematical constants and functions. Math works with the Number type. It doesn't work with BigInt. Math is not a constructor. You ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する