When i printed a “new” function instance before es6 i saw that it contains some values and in the proto i saw some other inherited values and so on in the prototype chain. But when i print a “new” class instance (es6) i see everything in that object as if it didn’t get it from any other object. and even if i delete the proto instance.__proto__=null
it still contains all the inherited values. Is the any difference between the inheritance type of them?
mercredi 19 juin 2019
Javascript es6 class extends vs function inheritance
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire