Array.prototype.toString = function(){
return "testing";
}
a1 = [1,2,3];
console.log(a1); // returns [1,2,3]
console.log(a1.toString()); // returns "testing"
why is that? How does the first log print out values? I thought it used the toString method?