简体   繁体   中英

How to add “use strict;” on first line when opening a new JavaScript file in VS Code?

How do I add the code "use strict"; to always appear on Line 1 when opening a new JavaScript file?

It's not clear to me that you can do so without an extension (you could write a snippet and assign it a shortcut but that's not exactly what you want). There is, however, an extension that will do that for you:

https://marketplace.visualstudio.com/items?itemName=veekas.use-strict-everywhere

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM