上一页 1 ··· 475 476 477 478 479 480 481 482 483 ··· 491 下一页
摘要: ES6 decided that Array Comprehensions will not included in this version, ES7 will include this. Therefore, only FireFox support this, you can test it ... 阅读全文
posted @ 2014-11-22 06:26 Zhentiw 阅读(306) 评论(0) 推荐(0)
摘要: Read More:http://es6.ruanyifeng.com/#docs/destructuringArray“模式匹配”,只要等号两边的模式相同,左边的变量就会被赋予对应的值:Exp 1:var [head, ...tail] = [1, 2, 3, 4];console.log(hea... 阅读全文
posted @ 2014-11-21 01:29 Zhentiw 阅读(258) 评论(0) 推荐(0)
摘要: Here is the way you get value from an object:var obj = { color: "blue"}console.log(obj.color); //blueDestructuring Assignment:ObjectDestructuring ... 阅读全文
posted @ 2014-11-21 01:07 Zhentiw 阅读(260) 评论(0) 推荐(0)
摘要: Normally, we can set default value for function param://Here use "Hello" as default paramvar receive =function(message="Hello", handle){ handler(me... 阅读全文
posted @ 2014-11-20 03:36 Zhentiw 阅读(326) 评论(0) 推荐(0)
摘要: ES6 arrow function is somehow like CoffeeScirpt.CoffeeScript: //function callcoffee = -> coffee()coffee=(messag... 阅读全文
posted @ 2014-11-20 03:22 Zhentiw 阅读(539) 评论(0) 推荐(0)
摘要: 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)
摘要: When you minify your code with a tool like Uglify, the resulting minified file will rename variables. This is a problem for AngualrJS, which uses para... 阅读全文
posted @ 2014-11-18 17:47 Zhentiw 阅读(1023) 评论(0) 推荐(0)
摘要: Local Install:npm install -g traceurnpm install grunt-contrib-watchnpm install grunt-traceur-latestGruntFile:module.exports = function(grunt){ grun... 阅读全文
posted @ 2014-11-17 22:55 Zhentiw 阅读(383) 评论(0) 推荐(0)
上一页 1 ··· 475 476 477 478 479 480 481 482 483 ··· 491 下一页