Math.random
Math.trunc
Math.sign
小数点以下を切り捨てて整数を返します。
Math.trunc(x)
아래 값을 입력하면 예제에 즉시 반영됩니다.
console
Math
console.log(Math.trunc(4.9)); // 4 console.log(Math.trunc(-4.9)); // -4