Hi all.
I need to know how to restore or roll back to built-in function after overriding like following example.
String.prototype.substr= function()
{ return "";}
Now I want to use the one already built-in.
I shall be very thankful if some one could help me.
Sultan Wadood
sultanwadood
0
Newbie Poster
Recommended Answers
Jump to PostI don't think its possible to revert to the old function unless you save it somewhere.
eg:
String.prototype._substr = String.prototype.substr; String.prototype.substr= function() { return this._substr(0,5); }
All 3 Replies
sultanwadood
0
Newbie Poster
digital-ether
399
Nearly a Posting Virtuoso
Team Colleague
sultanwadood
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.