1. 安裝 node.js

2.?Sublime 依次點(diǎn)擊 菜單欄 Tools => Build System?=> New Build System?

3. 文件中輸入下邊代碼
{?
"cmd":["node","$file"],
"selector":"source.js"
}

4.? ctrl + s 保存文件,修改文件名

5.? 調(diào)試js文件
新建 t1.js? 寫入下邊代碼
for (let i = 0; i < 3; i++) {
? ? console.log('i:', i);
}
然后 command + b 編譯

reference link:??https://blog.csdn.net/lyn167/article/details/51924032