I've never worked with prototype, and maybe I don't even understand how it works, so here I am.
I'm trying to change how .push() works in javascript: it adds the parameter as the last element, but I want it to add the parameter in the first position.
Here is my non-working guess:
Array.prototype.push() = function(e){
var x = [e];
return x.concat(this);
}
Sorry for the breathtaking mistakes I probably made :)
Disclaimer: I'm just trying to understand how to modify native methods. Why is everybody so scared?