Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. Why is the this keyword forbidden in JavaScript?

  2. A.

     Highly memory consuming

    B.

     Functions should access the global objects

    C.

     Functions should not access the global objects

    D.

     Very inefficient to use

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    The this keyword is forbidden or restricted because functions (in non-strict mode) can access the global object through this. Preventing access to the global object is one of the key purposes of any sandboxing system.


Be The First To Comment