摘要: 1.let关键字声明的变量,只在块中有效 if(true){ var a = 5; let b = 5; } console.log(a); console.log(b); 分割线 运行结果: 2.let关键字可以防止循环变量的泄露,同时能够提供闭包 for(let i = 0; i < 5; i+ 阅读全文
posted @ 2021-01-11 22:27 #Friday 阅读(139) 评论(0) 推荐(0)