Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. What is the purpose of the function eval?

  2. A.

     Executes the string as an integer

    B.

     Gets the value of the string

    C.

     Executing string as JavaScript

    D.

     None of the mentioned

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    eval is a JavaScript native function that accepts a string and executes the string as JavaScript. It basically fires up the interpreter and allows the passed-in string to be parsed and interpreted at the time of invocation.


Be The First To Comment