In most of the interview and from the most of the intelligent peoples this question comes if you will tell them that now i know the java script ,without wasting much time they will launch the question
what is prototype in java script?
My this article will expain the concept behind the java script's prototype
Prototype is nothing but the way to extend and override the existing functionality of the java script object
if you want to override the functionality you can,if you want to add extra functionality you can!
i am giving the example here
now i think all doubts are clear.
what is prototype in java script?
My this article will expain the concept behind the java script's prototype
Prototype is nothing but the way to extend and override the existing functionality of the java script object
if you want to override the functionality you can,if you want to add extra functionality you can!
i am giving the example here
String.prototype.divide = function()
{
var x=this;
return x.split(" ");
}
var str_data = "Gajendra Kumar Choudhary";
var test = str_data.divide();
alert(test);
now i think all doubts are clear.
Comments
Post a Comment