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