Evaluate/Execute JavaScript code/expressions:
The result of res will be:
The eval() function evaluates or executes an argument.
If the argument is an expression, eval() evaluates the expression. If the argument is one or more JavaScript statements, eval() executes the statements.
Function | |||||
---|---|---|---|---|---|
eval() | Yes | Yes | Yes | Yes | Yes |
Parameter | Description |
---|---|
string | A JavaScript expression, variable, statement, or sequence of statements |
JavaScript Version: | 1.0 |
---|