📜  javascript float to int - Javascript 代码示例

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

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