I read a JavaScript book, and I read how you can extend the functionality of arrays of JavaScript array with a prototype, then I came to this example, which I could not understand, and there was no deep explanation for this, and I do not know who can understand this:
Array.prototype.some_function = function(){ var args = this.some_function.arguments;
here I managed to access the arguments, but I donβt know how it works, that means it refers to the object we are calling this method (array in this context), and then some_function refer to the property of this object means the function that we we implement, but then the arguments are not a static property of this function, then how does it work? it only works in the context of the call, Iam cannot use this for other ex: -
this.some_other_function.arguments
Tiger source share