首页 > 编程语言 > 详细

JavaScript Objiects and Prototypes

时间:2015-12-25 14:53:13      阅读:248      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!