From http://www.w3schools.com (Copyright Refsnes Data)
JavaScript Functions
The eval() function evaluates and/or executes a string of JavaScript code.
First, eval() determines if the argument is a valid string, then eval() parses the string looking for JavaScript code. If it finds any JavaScript code, it will be executed.
| eval(string) |
| Parameter | Description |
|---|---|
| string | Optional. The string to be evaluated/executed |
ExampleEvaluate/Execute JavaScript code/expressions:
The output of the code above will be:
Try it yourself » |
JavaScript Functions
From http://www.w3schools.com (Copyright Refsnes Data)