我有這樣的代碼'use strict';let log = console.log;let cParent = function () { this.property1 = arguments[0] || null; this.property2 = arguments[1] || null; this.log = function () { log('log: ', this.property1); }};let obj1 = new cParent(4, 5);log(obj1.prototype);log(Object.getPrototypeOf(obj1));log(cParent.prototype);log(Object.getPrototypeOf(cParent));得到的結果是undefined{}{}[Function]
`obj.prototype` 和 `Object.getPrototypeOf(obj)`
慕斯709654
2018-08-09 11:10:14