📜  javascript float to int - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:54.547000             🧑  作者: Mango

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