摘要:
ES5(JS)中定义匿名函数: const myFunc = function() { const myVar = "value"; return myVar; } ES6中定义匿名函数: const myFunc = () => { const myVar = "value"; return my 阅读全文
摘要:
const Some developers prefer to assign all their variables using const by default, unless they know they will need to reassign the value. Only in that 阅读全文
摘要:
When you declare a variable with the var keyword, it is declared globally, or locally if declared inside a function. 当使用var关键字声明变量时,它是全局声明的(在循环语句中声明也是 阅读全文