[javascript] 소수점 이하 버림

예를 들어, Math.floor(3.14)3을 반환합니다. 이 함수를 사용하여 소수점 이하를 버릴 수 있습니다.

let number = 3.14;
let result = Math.floor(number);
console.log(result); // Output: 3

이렇게 하면 원하는 값을 얻을 수 있습니다. 자세한 내용은 MDN web docs를 참조할 수 있습니다.