Javatpoint Logo
Javatpoint Logo

JavaScript Number isInteger() method

The 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.


The isInteger() method is represented by the following syntax:


num - A number to be checked.


A Boolean value.

JavaScript Number isInteger() method example

Here, we will understand isInteger() method through various examples.

Example 1

Let's see a simple example of isInteger() method.

Test it Now


true true true 

Example 2

Let's see isInteger() method with some test cases.

Test it Now


true false 

Example 3

Let's see some values for which isInteger() method returns false.

Test it Now


false false false false false false

Next TopicJavaScript Math

Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA