Examveda
Examveda

Consider the following code snippet :
var grand_Total=eval("10*10+5");
The output for the above statement would be :

A. 10*10+5

B. 105 as a string

C. 105 as an integer value

D. Exception is thrown

Answer: Option C

Solution(By Examveda Team)

Even if the string value passed as a parameter to eval does represent a numeric value the use of eval() results in an error being generated.

This Question Belongs to Javascript >> Array And Function

Join The Discussion

Related Questions on Array and Function