I can access the prototype object of a javascript function using the .prototype
but when I cannot use .prototype
on a javascript object literal.
Please let me know why is this behavior inconsistent.
var add = function (a, b) { return a + b; };
var s={name:'Pradeep'}
console.log('Function\'s prototype >> '+add.prototype)
console.log('Object\'s prototype >> '+ s.prototype)