For example,
Math.mymfunc = function (x) {
return x+1;
}
will be treated as a property and when I write
for(var p in Math.__proto__) console.log(p)
it will be shown. But the rest of Math functions will not. How can I get all functions of a Math object?
mymfuncshouldn't appear in the enumeration because you're enumerating a different object (MathvsObject.prototype). If you're running that code in the console, it may appear as though it does, but really the console is just displaying the result of the assignment.