Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Fruit = function() {}
- Fruit.prototype = {
- color: function () {
- console.log('Fruit color...')
- }
- }
- var Apple = function () {}
- Apple.prototype = new Fruit()
- Apple.prototype.constructor = Apple
- var a = new Apple()
- Apple.prototype = null // the question!!!
- a.color()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement