from double to int js code example Example: js convert double to int var num = 2.9 console.log(parseInt(num, 10)); // 2