-
Consider the following code snippet :
var Total=eval("5*5+10");
-
- 35 as an integer value
- 35 as a string
- Exception is thrown
- 5*5+10
- None of these
Correct Option: A
eval() is a function property of the global object. The argument of the eval() function is a string. If the string represents an expression, eval() evaluates the expression. If the argument represents one or more JavaScript statements, eval() evaluates the statements.