Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As far as I understand, it's a property for references set to true when using references with <code>strict mode</code> in ECMAScript 5 (aka ES5) initialized. When <code>strict mode</code> is set, more operations will lead to errors (syntax, reference, for example initializing a variable without the <code>var</code> keyword). See the <a href="https://developer-new.mozilla.org/en-US/docs/JavaScript/Reference/Functions_and_function_scope/Strict_mode?redirectlocale=en-US&amp;redirectslug=JavaScript/Strict_mode" rel="nofollow">MDN-documentation</a> for more on <code>strict mode</code>.</p> <p>[<strong>edit</strong>] based on comment I think it's for the scope where <code>strict mode</code> is defined. So in</p> <pre><code>function strict() { 'use strict'; // from here on and within the function // IsStrictReference is true showme = "Am I defined?"; return "Hi! I'm a strict mode function! " + showme; } function nonstrict() { // IsStrictReference is ... well, undefined I suppose, or false by default showme2 = "Am I defined?"; return "Hi! I'm NOT a strict mode function! " + showme2; } strict(); //=&gt; ReferenceError: showme is not defined notstrict(); //=&gt; "Hi! I'm NOT a strict mode function! Am I defined?" </code></pre> <p>Executing <code>strict()</code> throws a <code>ReferenceError</code>, but <code>nonstrict()</code> doesn't. If you had placed the <code>use strict</code>-statement outside the function blocks, executing both functions would throw a <code>ReferenceError</code>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload