5.1.11 方法定义

Foo.prototype.bar = function() { ... };
给原型对象的构造函数添加方法和属性有很多种方式,更倾向于使用以下这种风格:

Foo.prototype.bar = function() {
  /* ... */
};