JavaScript Global Reference

The JavaScript global properties and methods can be used with all JavaScript objects.

JavaScript Global Methods and Properties

Name Description
decodeURI() Decodes a URI
decodeURI
Component()
Decodes a URI component
encodeURI() Encodes a URI
encodeURI
Component()
Encodes a URI component
escape() Deprecated. Use instead:
encodeURI()
encodeURIComponent()
eval() Evaluates a string and executes it as if it was script code
Infinity A numeric value that represents positive/negative infinity
isFinite() Determines whether a value is a finite, legal number
isNaN() Determines whether a value is an illegal number
NaN "Not-a-Number" value
Number() Converts an object's value to a number
parseFloat() Parses a string and returns a floating point number
parseInt() Parses a string and returns an integer
String() Converts an object's value to a string
undefined Indicates that a variable has not been assigned a value
unescape() Deprecated. Use instead:
decodeURI()
decodeURIComponent()

Note

Since these methods are global, and global the object is the browser window, these methods are actually window methods:

isNaN() is the same as window.isNaN().


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.