Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

JavaScript global properties/functions

JavaScript global


JavaScript global properties and methods can be used to create JavaScript objects.


JavaScript global properties

property Description
Infinity Represents a value of positive infinity.
NaN Indicates whether a value is a numeric value.
undefined Indicates an undefined value.

JavaScript Global Functions

function Description
decodeURI() Decodes an encoded URI.
decodeURIComponent() Decodes an encoded URI component.
encodeURI() Encodes a string as a URI.
encodeURIComponent() Encodes a string as a URI component.
escape() Encodes a string.
eval() Evaluates a JavaScript string and executes it as script code.
isFinite() Checks whether a value is a finite number.
isNaN() Checks whether a value is a number.
Number() Converts the value of an object to a number.
parseFloat() Parses a string and returns a floating-point number.
parseInt() Parses a string and returns an integer.
String() Converts the value of an object to a string.
unescape() Decodes a string encoded by escape().