所以我去了JSFiddle,试着看看'usestrict';到底实现了什么。代码如下: // Strict mode makes assignments which would otherwise silently fail to throw an exception'usestrict'; const undefined = 666; // throws
我正在基于我在AngularJS中看到的例子在茉莉花中构建单元测试。示例(如 )使用'usestrict'的全局形式。然而,JSHint抱怨说我应该
使用“使用严格”的函数形式。我知道为什么'usestrict'很重要,我想我理解为什么您应该在源文件中使用'usestrict'的函数形式而不是全局表单。然而,在茉莉花测试文件中,使用全局表单 of &