ES6
文章平均质量分 89
赵玉玲
只有不断接触新的东西生活才有趣味
展开
-
代码规范-提交时检查
工具:husky:Husky improves your commits and more woof! You can use it to lint your commit messages, run tests, lint code, etc… when you commit or push. Husky supports all Git hooks.husky可以让你方便的使用各种git hookslint-staged:This project contains a script that原创 2022-03-02 20:36:17 · 470 阅读 · 0 评论 -
箭头函数的特点
没有自己的this箭头函数中的this实际是外层函数的thisconst test={pro:'pro',con:()=>console.log(this)}test.con() //windowconst foo={bar:{con:test1.con},pro:'foopro'}foo.bar.con() //window(this与调用层数没有关系this是函数才有的内部...原创 2019-01-17 17:01:19 · 1941 阅读 · 0 评论