Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. Which are the two functions that are not allowed in any secure subset?

  2. A.

     evaluate() and restrict()

    B.

     eval() and the Function() constructor

    C.

     debugger() and test()

    D.

     eval() and debugger()

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    eval() and the Function() constructor are not allowed in any secure subset because they allow the execution of arbitrary strings of code, and these strings cannot be statically analyzed.


Be The First To Comment