Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有什么方法可以使用"use strong";并"use strict";用作备份吗?因为看起来谷歌浏览器是目前唯一支持"use strong";的浏览器。
"use strong";
"use strict";
您始终可以将代码包装在立即调用的函数表达式中,在其外部使用“use strict”,在内部使用“use strong”(因此,如果浏览器支持它,则优先):
"use strict" (function(){ "use strong"; //your code here })();