So Meta I can't Take it - Discussion


Hey Everyone,

I have the working solution posted below for "so Meta I cannot Take it". And my code works, but maybe you can help me understand what is happening here.

Is the code on line 2 and 6 running checks on objects that aren't being set any where in the script? Basically can I use typeof & hasOwnProperty on objects that don't exist as a way of checking the "rules" of Javascript?

This was a neat lesson and if my understanding is correct, it's very meta

// what is this "Object.prototype" anyway...?
var prototypeType = typeof Object.prototype;

// now let's examine it!
var hasOwn = Object.prototype.hasOwnProperty("hasOwnProperty");


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