0

what are the difference between,

var Human = function(){
this.age = 21;
};

and

Human.prototype.age = 31;
var ME = new Human();
document.write(ME.age); 

It showing output 21, why not 31 ?

Shohanur Rahaman
  • 379
  • 4
  • 14

0 Answers0