I know JavaScript is prototype based programming. It has only object. Creation of object is costly so we use object as prototype. I understand it gives hierarchy(links) for inheritance, from Object(global) for objects. but why there is one global object(Object)? What purpose does it achieve? Why such design?
Aucun commentaire:
Enregistrer un commentaire