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