29. So meta


#1

Why do I have to write 'has own property' twice?!

Object.prototype.hasOwnProperty("hasOwnProperty");

I don't get it at all. Why do I have to type hasOwnProperty after the dot and once again in (" ")s?


#2

Because you want to check if prototype of Object has own property called "hasOwnProperty".


#3

You want to know if hasOwnProperty comes from Object.prototype, I believe.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.