From 029197572b215ef3bf8c373925fb9f95504eafd8 Mon Sep 17 00:00:00 2001 From: tjcrowder Date: Mon, 7 Sep 2009 12:46:04 +0100 Subject: [PATCH] doc: ported old docs for Array#inspect, but dropped comment about Array#join --- src/lang/array.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lang/array.js b/src/lang/array.js index a3e7b4e..671b975 100644 --- a/src/lang/array.js +++ b/src/lang/array.js @@ -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(', ') + ']';