JavaScript Number isInteger() methodThe JavaScript number isInteger() method determines whether the given value is an integer. It returns true if the value is an integer, otherwise it returns false. SyntaxThe isInteger() method is represented by the following syntax: Parameternum - A number to be checked. ReturnA Boolean value. JavaScript Number isInteger() method exampleHere, we will understand isInteger() method through various examples. Example 1Let's see a simple example of isInteger() method. Test it NowOutput: true true true Example 2Let's see isInteger() method with some test cases. Test it NowOutput: true false Example 3Let's see some values for which isInteger() method returns false. Test it NowOutput: false false false false false false
Next TopicJavaScript Math
|
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week