From a1ab78858f62a0518ca40ce497ed6ee616451fc2 Mon Sep 17 00:00:00 2001 From: Tobie Langel Date: Mon, 7 Sep 2009 19:31:16 +0200 Subject: [PATCH] Minor syntactic correction in Array#reverse. --- src/lang/array.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lang/array.js b/src/lang/array.js index ca86111..f95aee7 100644 --- a/src/lang/array.js +++ b/src/lang/array.js @@ -226,9 +226,9 @@ Array.from = $A; /** * Array#reverse([inline = true]) -> Array * - inline (Boolean): Whether to modify the array in place. Defaults to `true`. - * Clones the original array first when `false`. + * Clones the original array when `false`. * - * Reverses the array's contents, optionally making a copy first. + * Reverses the array's contents, optionally cloning it first. * * ### Examples * @@ -244,7 +244,7 @@ Array.from = $A; * // nums -> [20, 1, 6, 5, 3] **/ function reverse(inline) { - return (inline !== false ? this : this.toArray())._reverse(); + return (inline === false ? this.toArray() : this)._reverse(); } /**