Learn how to remove the decimal part of a number in JavaScript.
You can use the Math.trunc() method to remove the decimals of a number:
Math.trunc()
Tip: Learn more about the Math.trunc() method in our JavaScript Reference.
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!