摘要:
In ES6, IIFE is not necessary:// IIFE写法(function () { var tmp = ...; ...}());// 块级作用域写法{ let tmp = ...; ...}另外,ES6也规定,函数本身的作用域,在其所在的块级作用域之... 阅读全文
posted @ 2014-11-19 23:44
Zhentiw
阅读(327)
评论(0)
推荐(0)
摘要:
Fialdcase 1: let can work in it's block{ let a = 10; var b = 1;}a // ReferenceError: a is not defined.b //1Case 2: Let has no "Hosting" Problemf... 阅读全文
posted @ 2014-11-19 23:23
Zhentiw
阅读(257)
评论(0)
推荐(0)
摘要:
var message = "Hi";{ var message = "Bye"; }console.log(message); //ByeThe message inside the block still has impact on the outside.Just rememb... 阅读全文
posted @ 2014-11-19 23:11
Zhentiw
阅读(304)
评论(0)
推荐(0)

浙公网安备 33010602011771号