Home » JavaScript » JavaScript Functions » Question
  1. Which of the following is the correct code for invoking a function without this keyword at all, and also too determine whether the strict mode is in effect?
    1. mode strict = (function { });
    2. var strict = (function { return this; });
    3. mode strict = (function() { return !this; }());
    4. var strict = (function() { return !this; }());
    5. None of these
Correct Option: D

The above code defines and invokes a function to determine if we’re in strict mode.



Your comments will be displayed only after manual approval.