1. 在VScode中  文件 → 首选项 → 用户代码片段 → 在搜索框中搜索 JavaScript 选择 JavaScript.json

prefix  是输入前缀就可以打出console.log了    cl是可以根据自己习惯修改   我使用cl有的时候会打出class 可以自行配置

{
	"Print to console": {
			"prefix": "cl",
			"body": [
				"console.log('$1');",
			],
			"description": "Log output to console"
		}
}

更多推荐