Math.random
Math.trunc
Math.sign
Returns the integer part of a number by removing any fractional digits.
Math.trunc(x)
아래 값을 입력하면 예제에 즉시 반영됩니다.
console
Math
console.log(Math.trunc(4.9)); // 4 console.log(Math.trunc(-4.9)); // -4