Lecture 8 Object-OrientedJavaScript.pptVIP

  • 19
  • 0
  • 约7.42千字
  • 约 35页
  • 2016-12-06 发布于湖北
  • 举报
Lecture 8 Object-OrientedJavaScript

* * Most people are used to regular object-oriented programming where types are defined by classes, which are usually closed (you cannot change them dynamically), and where they serve as blueprints for all instances of the class. Classes can organize themselves in a hierarchy, where every child class inherits all the attributes of its ancestor classes. JavaScript works in an entirely different way. Everything is an object, and every object is defined by a constructor function and this constructor’s prototype. A prototype is basically a repository of things (mostly methods) that all objects p

文档评论(0)

1亿VIP精品文档

相关文档