doc: ported old docs for Array#inspect, but dropped comment about Array#join

This commit is contained in:
tjcrowder 2009-09-07 12:46:04 +01:00 committed by Tobie Langel
parent 70dbcf39eb
commit 029197572b
1 changed files with 5 additions and 0 deletions

View File

@ -291,6 +291,11 @@ Array.from = $A;
* Array#inspect() -> String
*
* Returns the debug-oriented string representation of an array.
*
* ### Example
*
* ['Apples', {good: 'yes', bad: 'no'}, 3, 34].inspect()
* // -> "['Apples', [object Object], 3, 34]"
**/
function inspect() {
return '[' + this.map(Object.inspect).join(', ') + ']';