JavaScript Number isFinite() methodThe JavaScript number isFinite() method determines whether the given value is a finite number. It returns true if the value is a finite number, otherwise it returns false. SyntaxThe isFinite() method is represented by the following syntax: Parameternum - A number to be checked. ReturnA Boolean value. JavaScript Number isFinite() method exampleHere, we will understand isFinite() method through various examples. Example 1Let's see a simple example of isFinite() method. Test it NowOutput: true true true Example 2In this example, we will use isFinite() method with negative numbers. Test it NowOutput: true false Example 3Let's see isFinite() method with some different test cases. Test it NowOutput: false false false
Next TopicJavaScript Number
|