码迷,mamicode.com
首页 > 编程语言 > 详细

JavaScript Objiects and Prototypes

时间:2015-12-25 14:53:40      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:

Create JavaScript Objects

Using Object Literals:  var obj = {name: ‘Allen‘, color: ‘White‘};

  Dynamic Nature of JavaScript:  obj.age = 3;

Using Constructor Functions:

Using Object.create:

Using ECMAScript6 Classes:

技术分享

 

JavaScript Object Properties:

Using Bracket Notation to Access Properties: obj[‘bracket notation‘] = ‘a‘;

Using Properties Descriptors:

Using Writable Attribute:

Using Enumerable Attribute:

Using Configurable Attribute:

Using Getters and Setters:

技术分享

 

Prototypes and Inheritance:

技术分享

 

技术分享

 

技术分享

JavaScript Objiects and Prototypes

标签:

原文地址:http://www.cnblogs.com/xiao-hei/p/5075629.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!