Hi,
If I want to add an isEmpty method to all JavaScript arrays, I would use the following code
Array.prototype.isEmpty = function() {
return this.length == 0;
}
Assume this code is in a file foo.js. If I want isEmpty to be available on all pages of a web site, would I need to include foo.js in all the HTML files? In other words, do the prototypes get "reset" whenever the user navigates to a different page?
Thanks, Don