Skip to content

Commit 391dd4c

Browse files
authored
Merge pull request phaserjs#3790 from samme/fix/array-each
Fix extra argument passing in Array.Each
2 parents c5f28f1 + 703f338 commit 391dd4c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/utils/array/Each.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @param {array} array - The array to search.
1414
* @param {function} callback - A callback to be invoked for each item in the array.
1515
* @param {object} context - The context in which the callback is invoked.
16-
* @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.
16+
* @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.
1717
*
1818
* @return {array} The input array.
1919
*/
@@ -22,7 +22,7 @@ var Each = function (array, callback, context)
2222
var i;
2323
var args = [ null ];
2424

25-
for (i = 2; i < arguments.length; i++)
25+
for (i = 3; i < arguments.length; i++)
2626
{
2727
args.push(arguments[i]);
2828
}

0 commit comments

Comments
 (0)