问题 1
What is the purpose of the 'use strict' directive in JavaScript?
The 'use strict' directive enforces a stricter set of parsing and error handling rules in JavaScript. It helps catch common coding errors and prevents the use of certain error-prone features.
Example:
```javascript
'use strict';
// Strict mode code goes here
```
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
这有帮助吗?
添加评论
查看评论