Wednesday, 28 December 2011

JavaScript global properties and functions


The JavaScript global properties and functions can be used with all the built-in JavaScript objects.

JavaScript Global Properties

PropertyDescription
InfinityA numeric value that represents positive/negative infinity
NaN"Not-a-Number" value
undefinedIndicates that a variable has not been assigned a value

JavaScript Global Functions

FunctionDescription
decodeURI()Decodes a URI
decodeURIComponent()Decodes a URI component
encodeURI()Encodes a URI
encodeURIComponent()Encodes a URI component
escape()Encodes a string
eval()Evaluates a string and executes it as if it was script code
isFinite()Determines whether a value is a finite, legal number
isNaN()Determines whether a value is an illegal number
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
unescape()Decodes an encoded string

No comments:

Post a Comment