15.4.4.2 Array.prototype.tostring()

2010-07-05

string Array.prototype.tostring()

This function calls .join (15.4.4.5) on itself with no arguments. The this value is coerced to an object. If it does not have a callable join property it falls back to Object.prototype.toString.

Code: (Meta Ecma)
Array.prototype.tostring = function(){
var array = ToObject(this);
var func = array.[[Get]]("join");
if (!IsCallable(func)) func = Object.prototype.toString;
return func.[[Call]](array, []);
}