Global Functions
Core JavaScript defines a handful of global functions:
-
escape(s)
Encode a string for transmission. JavaScript 1.0; ECMA-262; Unicode support in Internet Explorer 4.
-
eval(code)
Execute JavaScript code from a string.
-
getClass(javaobj)
Return the JavaClass of a JavaObject. Navigator 3.
-
isFinite(n)
Determine whether a number is finite. JavaScript 1.2; ECMA-262.
-
isNaN(x)
Check for not-a-number. JavaScript 1.1; ECMA-262.
-
parseFloat(s)
Convert a string to a number. JavaScript 1.0; enhanced in JavaScript 1.1; ECMA-262.
-
parseInt(s, radix)
Convert a string to an integer. JavaScript 1.0; enhanced in JavaScript 1.1; ECMA-262.
-
unescape(s)
Decode an escaped string. JavaScript 1.0; ECMA-262; Unicode support in Internet Explorer 4.
In addition to these core global functions, the Window object defines a number of client-side global methods.
Get Webmaster in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.