Skip to content

Commit 92e0b62

Browse files
authored
Updated code with the correct variable
It was only arr at both the place instead of arr1 and arr2
1 parent 0079195 commit 92e0b62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

challenges/collections.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,13 @@ Object.prototype.toString.call(arr) === '[object Array]'
266266

267267
```js
268268
function mergeArray(arr1, arr2 = arr1){
269-
return [...arr, ...arr];
269+
return [...arr1, ...arr2];
270270
}
271271
```
272272

273273
```js
274274
function mergeArray(arr1, arr2 = arr1){
275-
return arr.concat(...arr);
275+
return arr1.concat(...arr2);
276276
}
277277
```
278278

0 commit comments

Comments
 (0)