eval() [FF, IE 3]

Evaluates a string. Example:

var the_sum = eval("2 + 3");

The variable the_sum will equal 5 because eval() forces JavaScript to evaluate the string "2 + 3".

Get The Book of JavaScript, 2nd 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.