自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 资源 (1683)
  • 收藏
  • 关注

原创 ES6学习系列目录

ES6学习系列目录

2015-12-14 08:46:16 2057

原创 ES6学习——新的语法:数组解构(Array Destructuring)

上一篇文章讲了Object的解构,这篇讲一下Array的解构,概念大同小异,只是写法会有一些不同,先看个简单的例子:let [x, y] = ['a', 'b','c']; // x = 'a'; y = 'b'跟对象解构一样,先探讨一下赋值表达式的右侧应具备什么条件才能进行解构赋值,规范的12.14.5.2有这样的描述:ArrayAssignmentPattern : [ ]

2015-12-31 10:03:31 18865

原创 ES6学习——新的语法:对象解构(Object Destructuring)

解构在ES6中应该是一种新的语法,在其他语言中我没怎么见到这种语法,也可以说是赋值操作的另一种形式,因为解构的整个定义都在规范的赋值操作符章节下面,有兴趣的可以看规范的12.14.5。目前浏览器对这个新语法的支持还不是很好,但是Firefox 43已经支持了大部分解构特性,这里我们仍然继续使用Kinoma Studio来测试代码。这篇文章主要讲对象的解构赋值操作,先看个简单的例子有点印象:

2015-12-30 16:55:46 22850 2

原创 ES6学习——新的语法:函数参数默认值

这个特性在其他语言中已经早有实现,ES6中加入了这个新特性,但是就目前来看还没有主流的浏览器支持这个特性,在没有这个特性之前,我们也经常会对函数参数设置默认值,例如下面这个例子:function foo(x,y) { x = x || 11; y = y || 31; console.log( x + y );}ES6中可以把上面的代码简化:function

2015-12-28 09:30:55 12930

原创 ES6学习——新的语法:Rest

Rest操作符和Spread操作都是用三个点(...)表示,但作用整好相反。Rest操作符一般用在函数参数的声明中,而Spread用在函数的调用中。下面看个例子: 'use strict'; function func(...args){ console.log(args);//[1,2,3,4] } func(1,2,3,4);我们知道在strict mode下,对

2015-12-25 08:48:01 5290

原创 ES6学习——新的语法:数组元素Spread

前一篇文章讲了Spread操作符在函数参数中的用法,这篇简单讲一下Spread操作符在数组元素中的应用。直接看代码吧:[1, ...[2,3], 4]//[1, 2, 3, 4]let x = ['a', 'b'];let y = ['c'];let z = ['d', 'e'];let arr = [...x, ...y, ...z]; // ['a', 'b', 'c', 'd

2015-12-24 08:18:43 1637

原创 ES6学习——新的语法:函数参数Spread

Spread操作符(...)是比较新的特性,但是在ES6的规范中,没有找到单独的章节对这个操作符进行说明,这个操作符主要用在两种情况下:函数传参和数组生成,这节主要讲解第一种情况。规范的12.3.6.1中对函数参数列表的解释如下:ArgumentList : ... AssignmentExpression1. Let list be an empty List.2. Le

2015-12-23 08:21:58 5452

原创 ES6学习——新的语法:Temporal Dead Zone(TDZ)

应该说TDZ在JS中是一个比较新的概念,在规范里我也没有搜到对这个概念的具体定义,主要涉及let/const,函数参数默认值,subclass等的使用中。(一)下面先看let/const中的TDZ问题,规范中这样写到:13.3 let and const declarations define variables that are scoped to the running exe

2015-12-22 09:24:37 1852

原创 ES6学习——新的语法:const

ES6终于加入了声明常量的语法,这种语法在其他语言中几乎都有,看一下用法: const c1 = 1; const c2 = {}; const c3 = [];Object.getOwnPropertyDescriptor(window,"c1")//Object {value: 1, writable: false, enumerable: true, configurable

2015-12-21 08:15:32 4498

原创 ES6学习——新的语法:let

let的主要用途就是声明块级作用域的变量,看一下规范是怎么说的,请仔细看红字部分,后边TDZ章节会详细讲这点:13.3 let and const declarations define variables that are scoped to the running execution context’s LexicalEnvironment. The variables are creat

2015-12-18 08:56:26 3701

原创 ES6学习——新的语法:块级作用域概述

在ES6之前,JS中只有两种作用域:全局和函数级别作用域。就是说你声明的变量要么可以全局访问,要么在函数内访问。当然了,函数内肯定能访问全局的变量//全局级别var globalVar = 1;window.globalVar2 = 2//函数级别(function(){ var f1 = 1;})(); function func(){ var

2015-12-17 09:15:25 1563

原创 ES6学习——环境搭建

ES6规范2015年发布,现在浏览器对它的支持正在不断的加强,具体查看浏览器对ES6支持的程度,请参考https://kangax.github.io/compat-table/es6/,如果想查看浏览器对所有JS,CSS,HTML5新特性的支持,请参考http://caniuse.com/想要学习ES6,有几种方法:1. 在浏览器上尝试,这需要浏览器对ES6的支持,目前看支持程度

2015-12-16 08:31:46 9204

原创 ES6学习——ES6背景介绍

关于ES6的介绍网上有很多,就没必要多说了,下面列出两个参考。中文的可以参考这里:https://zh.wikipedia.org/wiki/ECMAScript,英文的可以参考这里:https://en.wikipedia.org/wiki/ECMAScript从ECMA-262 Edition 3 到 Edition 6 经历了6(2009~2015)年的时间,

2015-12-15 07:39:53 1652

angularjs,ionic,cordova 简单示例应用——CFTC持仓数据

CFTC持仓(欧元,英镑,澳元,黄金,白银,标普500等)

2015-08-20

Functional Programming in Swift (2014-10-01)

Functional Programming in Swift (2014-10-01)

2015-05-21

WIN7 财经日历Gadget

WIN7 财经日历 Gadget

2013-05-13

Pattern-Oriented Software Architecture(全5卷 英文)

经典之作,不用多说。 经典之作,不用多说。 经典之作,不用多说。

2010-05-21

浅析javascript原型继承机制

浅析javascript原型继承机制,浅析javascript原型继承机制

2009-07-26

js的中国农历,不错

js的中国农历,js的中国农历,js的中国农历

2009-05-05

IronPython2.0最新版本以及IDE等源码

IronPython2.0最新版本以及IDE等源码

2009-03-01

Windows.Vista.Security.Guide.2008

Windows.Vista.Security.Guide.2008

2009-02-28

Web Application Design Patterns

Web Application Design Patterns

2009-02-28

The.Creation.and.Science.of.Web.Design.Jan.2009

The.Creation.and.Science.of.Web.Design.Jan.2009

2009-02-28

Team Foundation Server 2008 in Action

Team Foundation Server 2008 in Action

2009-02-28

Struts 2 Design and Programming A Tutorial

Struts 2 Design and Programming A Tutorial

2009-02-28

Silverlight 2 in Action

Silverlight 2 in Action

2009-02-28

Programming Microsoft Dynamics CRM 4.0

Programming Microsoft Dynamics CRM 4.0

2009-02-28

Packt.Publishing.Learning.Website.Development.with.Django.Mar.2008

Packt.Publishing.Learning.Website.Development.with.Django.Mar.2008

2009-02-28

MS - Microsoft SQL Server 2008 T-SQL Fundamentals (2008.10).

MS - Microsoft SQL Server 2008 T-SQL Fundamentals (2008.10).

2009-02-28

Microsoft Visual Studio Tips

Microsoft Visual Studio Tips

2009-02-28

Microsoft Press - Microsoft Visual C# 2008 Express Edition Build a Program Now!.

Microsoft Press - Microsoft Visual C# 2008 Express Edition Build a Program Now!.

2009-02-28

Microsoft .NET Architecting Applications for the Enterprise

Microsoft .NET Architecting Applications for the Enterprise

2009-02-28

Manning.Hibernate.Search.In.Action.Dec.2008

Manning.Hibernate.Search.In.Action.Dec.2008

2009-02-28

Manning - Flex 3 In Action (2009.02).

Manning - Flex 3 In Action (2009.02).

2009-02-28

Foundation XML and E4X for Flash and Flex

Foundation XML and E4X for Flash and Flex

2009-02-28

GoF Design Patterns with examples using Java and UML2

GoF Design Patterns with examples using Java and UML2

2009-02-28

Exploring C++ The Programmer’s Introduction to C++.

Exploring C++ The Programmer’s Introduction to C++.

2009-02-28

Developing Service-Oriented AJAX Applications on the Microsoft Platform

Developing Service-Oriented AJAX Applications on the Microsoft Platform

2009-02-28

Building the Agile Enterprise With SOA, BPM and MBM

Building the Agile Enterprise With SOA, BPM and MBM

2009-02-28

Apress.Pro.Web 2.0.Mashups.2008

Apress.Pro.Web 2.0.Mashups.2008

2009-02-28

Apress.Pro.Oracle.Application.Express.Sep.2008.eBook-DDU

Apress.Pro.Oracle.Application.Express.Sep.2008.eBook-DDU

2009-02-28

Advanced Software Testing - Vol. 2

Advanced Software Testing - Vol. 2

2009-02-28

Linux&UnixShell

Linux&UnixShell,Linux&UnixShell

2009-02-23

Linux-101-Hacks

Linux-101-Hacks,Linux-101-Hacks

2009-02-23

jquery+prototype+插件+源码+资料

jquery+prototype+插件+源码+资料

2009-02-23

jQuery UI 1.6 - The User Interface Library for jQuery (Feb 2009)

jQuery UI 1.6 - The User Interface Library for jQuery (Feb 2009)

2009-02-23

iPhone Open Application Development Second Edition

iPhone Open Application Development Second Edition

2009-02-23

I.O.U.S.A. One Nation. Under Stress. In Debt

I.O.U.S.A. One Nation. Under Stress. In Debt

2009-02-23

HIGHTECH_MISERY_CHINA_WEB

HIGHTECH_MISERY_CHINA_WEB

2009-02-23

Delivering Business Intelligence with Microsoft SQL Server(TM) 2E 2008

Delivering Business Intelligence with Microsoft SQL Server(TM) 2E 2008

2009-02-23

Basics.Of.Compile.Design

Basics.Of.Compile.Design

2009-02-23

Apress[1].Pro.JavaScript.Design.Patterns.Dec.2007

Apress[1].Pro.JavaScript.Design.Patterns.Dec.2007

2009-02-23

多线程+Ajax技术 实现Web站点生成静态html页面

多线程+Ajax技术 实现Web站点生成静态html页面 解压密码为:17fx.net

2009-02-18

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除