lundi 5 juillet 2021

Number.is Integer not working - Javascript [closed]

I want that the program should check if the number is A decimal or integer. The syntax i wrote here is wrong. What should be the real syntax

var num = 4
if (Number.Integer(num)) {
    console.log(num + "Is an Integer")
} else {
    console.log(num + "Is not an integer")
}

The syntax I wrote is maybe wrong

Aucun commentaire:

Enregistrer un commentaire