Merge pull request #27 from npnjuguna/npnjuguna-splice-method-in-array-example-fix

splice method in array example fix
pull/29/head
Asabeneh 5 years ago committed by GitHub
commit 112ed61f03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -503,7 +503,7 @@ Splice: It takes three parameters:Starting position, number of times to be remov
```js
const numbers = [1, 2, 3, 4, 5];
console.log(numbers.splice() // -> remove all items
console.log(numbers.splice()) // -> remove all items
console.log(numbers.splice(0,1)) // remove the first item
console.log(numbers.splice(3, 3, 6, 7, 8)) // -> [1,2,6,7,8] //it removes two item and replace three items

Loading…
Cancel
Save