i am a total newbie to JS. My Question is why use prototypes , can't we just add a property and give it a default value like this
function car(seats,engine,radio){
this.seats=seats;
this.engine=engine;
this.radio='am/fm';
};
Thanks. As a newbie i searched internet but was unable to fins a simple solution. Thanks.