Independent Functions, Operators, Variables, and Literals

The following subsections describe the functions, operators, variables, and literals that are built in to JavaScript, without being attached to a specific JavaScript object.

Independent Functions

  • escape(character)— Returns a string containing the ASCII encoding of character in the form %xx; xx is the numeric encoding of the character. (2|3|I)

  • eval(expression)— Returns the result of evaluating expression, which is an arithmetic expression. (2|3|I)

  • isNaN(value)— Evaluates value to see if it's NaN. Returns a Boolean value. (2|3|I) (On UNIX platforms, not 2.)

  • parseFloat(string)— Converts string to a floating-point number and returns the value. It continues to convert until it hits a non-numeric ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 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.