Skip to content

Commit ea0850d

Browse files
lfg
1 parent 6ccd96c commit ea0850d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

script.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ arr.push(0);
1313

1414
console.log(arr);
1515

16-
// CHALLENGE 2 Expectation ==> [1,2,3,4,5,6,7,8,9,10]
16+
// CHALLENGE 2 Expectation ==> [1,2,3,4,5,6,7,8,9,10, 11]
1717

1818
const arr1 = [1, 2, 3, 4, 5];
19-
const arr2 = [5, 6, 7, 8, 9, 10];
19+
const arr2 = [5, 6, 7, 8, 9, 10, 11];
2020

2121
// SOLUTION 1
2222
const arr3 = arr1.slice(0, 4).concat(arr2); // if we used splice here it will work but also mutate the initial array

0 commit comments

Comments
 (0)