0

Hi there,

I'm reading a book on Javascript and trying to understand a few concepts that are about hasOwnProperty(), propertyIsEnumerable() and isPrototypeOf(). I don't understand when and how these methods are used. That would so appreciated if someone can explain them to me in a nutshell.

This example is from the same book:

var o = {};

// how do we read the line below ?????
Object.prototype.isPrototypeOf(o);                 // true: o.constructor == Object
Object.isPrototypeOf(o);                           //false
o.isPrototypeOf(Object.isPrototypeOf);             // false
Function.prototype.isPrototypeOf(Object);          //true: Object.constructor == Function

Edited by rotten69

2
Contributors
2
Replies
3
Views
4 Years
Discussion Span
Last Post by rotten69
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.