📜  获取数字的整个值 javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:08.380000             🧑  作者: Mango

代码示例1
var value = 2.9802453587962963;
var wholeNum = Math.floor(value);
console.log(wholeNum);  // output ==> 2