const int = 10;
const float = 10.5;
console.log(Number.isInteger(int)); // true
console.log(Number.isInteger(float)); // false
// Explanation
// The Number.isInteger() method returns true
// if a value is an integer of the datatype Number.
// Otherwise it returns false
// Source: https://www.w3schools.com/jsref/jsref_isinteger.asp