Microsoft® JScript™
eval Function
Language Reference |
Version 1 |

See Also


Description

Evaluates JScript code.

Syntax

eval(codestring)

The codestring argument is a String object that contains valid JScript code. This string is parsed by the JScript parser and executed.

Remarks

The eval function allows dynamic execution of JScript source code. For example, the following code creates a new variable mydate that contains a Date object:

eval("var mydate = new Date();");


© 1997 Microsoft Corporation. All rights reserved.