Number.isInteger() to check Integer

input_number: Input value

Return value is boolean. If the input number is an integer then true is returned , otherwise false
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

What is NaN ?

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

Check string if it is a number or not
JavaScript Math Reference
Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net

    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-2023 All rights reserved worldwide Privacy Policy Disclaimer