isNumber

Modified on Mon, 21 Aug 2023

Description

Use this function to check if a value is classified as a Number primitive or object.

Syntax

isNumber(value)

Returns

Return ValueDescription
True/FalseReturns true if the given value is classified as a Number primitive or object, and false otherwise.

Sample

ExampleResultDescription
isNumber(5)trueReturns true if the given value, 5, is a Number primitive or object.
isNumber('hello')falseReturns false if the given value, 'hello', is not a Number.

To view all the Language functions, click here.