Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Level 1
Level 2
Melden Sie sich an, um alle Badges zu sehen
Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Gelöst! Gehe zu Lösung.
Anhand von Themen werden Community-Inhalte kategorisiert und Sie können so relevanten Inhalt besser finden.
Zugriffe
Antworten
Likes gesamt
"use strict" applies only to function or program scope. So if you have fileA.js with "use strict" at the top, fileA.js executes in strict mode, and all functions defined in it will do the same when called. But fileB.js is a separate program, so the "use strict" from fileA.js doesn't apply to it.
The entire file :
<script...>
"use strict";
or
The entire function and its embedded functions for example :
function fn(){ "use strict";
Check this for more detail before applying for the entire file
https://stackoverflow.com/questions/2343608/in-ecmascript5-whats-the-scope-of-use-strict
Hi,
In any custom file where we need the strict scope to be applied, the 'use strict' must be added there itself. So far not came across a global way to do that. We can see if Adobe staff can confirm.
"use strict" applies only to function or program scope. So if you have fileA.js with "use strict" at the top, fileA.js executes in strict mode, and all functions defined in it will do the same when called. But fileB.js is a separate program, so the "use strict" from fileA.js doesn't apply to it.
The entire file :
<script...>
"use strict";
or
The entire function and its embedded functions for example :
function fn(){ "use strict";
Check this for more detail before applying for the entire file
https://stackoverflow.com/questions/2343608/in-ecmascript5-whats-the-scope-of-use-strict
Zugriffe
Likes
Antworten