O'Reilly logo

Platinum Edition Using XHTML™, XML, and Java™ 2 by Andrew H. Watt, Mike Morgan, Jim O'Donnell, Eric Ladd

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required