Number.isInteger() to check Integer

Number.isInteger(input_number);
input_number: Input value

Return value is boolean. If the input number is an integer then true is returned , otherwise false
<script>
document.write(Number.isInteger(5)) // true 
document.write(Number.isInteger(-5)) // true 
document.write(Number.isInteger(0)) // true 
document.write(Number.isInteger(5.5)) // false
document.write(Number.isInteger(-5.5)) // false  
document.write(Number.isInteger('5')) // false
document.write(Number.isInteger('abc')) // false
</script>

What is NaN ?

Factors of a number To display factors of an input number, isInteger is used to check the user input number


plus2net.com




Post your comments , suggestion , error , requirements etc here .




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer