上一页 1 ··· 451 452 453 454 455 456 457 458 459 ··· 468 下一页
摘要: The spread operator (...) allows you to "explode" an array into its individual elements.Spreate an array:console.log([1,2,3]); // [1, 2, 3] conso... 阅读全文
posted @ 2014-11-23 01:41 Zhentiw 阅读(458) 评论(0) 推荐(0) 编辑
摘要: Where destructuring in ES6 allows you to easily get properties out of an object, this shorthand property syntax allows you to easily push properties i... 阅读全文
posted @ 2014-11-23 01:30 Zhentiw 阅读(328) 评论(0) 推荐(0) 编辑
摘要: ECMAscript 6 lets us use string templates to gain a lot more control over strings in JavaScript.var salutation = "Hello";var place = "New York";var gr... 阅读全文
posted @ 2014-11-22 19:19 Zhentiw 阅读(220) 评论(0) 推荐(0) 编辑
摘要: $intervalprovides an excellent service for timed operations in your AngularJS apps. It has the advantage over setInterval in "normal" Javascript in th... 阅读全文
posted @ 2014-11-22 06:49 Zhentiw 阅读(2322) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(298) 评论(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 阅读(247) 评论(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 阅读(251) 评论(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 阅读(322) 评论(0) 推荐(0) 编辑
摘要: ES6 arrow function is somehow like CoffeeScirpt.CoffeeScript: //function callcoffee = -> coffee()coffee=(messag... 阅读全文
posted @ 2014-11-20 03:22 Zhentiw 阅读(532) 评论(0) 推荐(0) 编辑
摘要: In ES6, IIFE is not necessary:// IIFE写法(function () { var tmp = ...; ...}());// 块级作用域写法{ let tmp = ...; ...}另外,ES6也规定,函数本身的作用域,在其所在的块级作用域之... 阅读全文
posted @ 2014-11-19 23:44 Zhentiw 阅读(320) 评论(0) 推荐(0) 编辑
上一页 1 ··· 451 452 453 454 455 456 457 458 459 ··· 468 下一页