// how to check if a number is a whole number in javascript console.log(Number.isInteger(123)); // true console.log(Number.isInteger(123.123)); // false