1.

What is the purpose of the function eval?(a) Executes the string as an integer(b) Gets the value of the string(c) Executing string as JavaScript(d) Executing string as an objectI have been asked this question in a national level competition.My enquiry is from Comparison of Core JavaScript versus Frameworks in section Caching, Debugging and Animation of JavaScript

Answer»

Right answer is (C) Executing string as JAVASCRIPT

The best I can EXPLAIN: EVAL is a JavaScript native function that accepts a string and executes the string as JavaScript. The argument of the eval() function is a string. It basically fires up the interpreter and allows the passed-in string to be PARSED and interpreted at the time of invocation.



Discussion

No Comment Found

Related InterviewSolutions