isFinite

 

Summary

Evaluates an argument to determine whether it is a finite number.

Core Global Method
Implemented in JavaScript 1.3
ECMAScript Edition ECMAScript 2

Syntax

isFinite(number)

Parameters

number
The number to evaluate.

Description

isFinite is a top-level function and is not associated with any object.

You can use this function to determine whether a number is a finite number. The isFinite function examines the number in its argument. If the argument is NaN, positive infinity, or negative infinity, this method returns false; otherwise, it returns true.

Examples

Example: Using isFinite

You can check a client input to determine whether it is a finite number.

if (isFinite(ClientInput)) {
   /* take specific steps */
}

Tags (0)

Edit tags
  • No tags

Attachments (0)

 

Attach file