Update 01_javascript_refresher.md

I was going through this articles to learn and at the same time i was running them too, at that moment of time i found some changes need to be done in the splice() section.
pull/398/head
faizanalam11 9 months ago committed by GitHub
parent 8b41cd49c3
commit a1ec8beac1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -799,7 +799,8 @@ console.log(numbers.splice(0, 1)) // remove the first item
```js
const numbers = [1, 2, 3, 4, 5, 6]
console.log(numbers.splice(3, 3, 7, 8, 9)) // -> [1, 2, 3, 7, 8, 9] //it removes three item and replace three items
console.log(numbers.splice(3, 3, 7, 8, 9)) // -> [4, 5, 6] here it shows the removed items
console.log(numbers) // -> [1, 2, 3, 7, 8, 9] //it removes three item and replace three items
```
##### Adding item to an array using push

Loading…
Cancel
Save