-
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?
-
- mode strict = (function { });
- var strict = (function { return this; });
- mode strict = (function() { return !this; }());
- var strict = (function() { return !this; }());
- None of these
Correct Option: D
The above code defines and invokes a function to determine if we’re in strict mode.