Contact: aviboots(AT)netvision.net.il
38,551 questions
50,222 answers
573 users
let d = 24278.0; if (d == Math.floor(d)) { console.log("The double variable contains an integer"); } else { console.log("The double variable contains a floating point"); } /* run: The double variable contains an integer */
const d = 12735423.0; console.log(Number.isInteger(d)); /* run: true */