Simply why does String.prototype log the string object with the standard curly brackets and key value pairs, and the Array.prototype log the array object just like an array, with square brackets and values?
String.prototype.test = function(){
console.log(this); // logs { '0': 't', '1': 'e', '2': 's', '3': 't' }
};
var str = 'test';
str.test();
Array.prototype.test1 = function(){
console.log(this); // [1,2,3,4]
};
var arr = [1,2,3,4];
arr.test1();