天天看点

Javascript Object

1. 动态添加对象的属性和方法

2. 一次性创建对象

3. 使用内建的构造函数

literal notation的优点:

1)it’s shorter to type

2)it emphasizes that objects are simply mutable hashes and not something that needs to be baked from a “recipe” (from a class) 

3) faster

技术改变世界

继续阅读