@ -521,19 +521,21 @@ Splice: It takes three parameters:Starting position, number of times to be remov
```js
```js
const numbers = [1, 2, 3, 4, 5]
const numbers = [1, 2, 3, 4, 5]
numbers.splice()
console.log(numbers.splice() ) // -> remove all items
console.log(numbers) // -> remove all items
```
```
```js
```js
const numbers = [1, 2, 3, 4, 5]
const numbers = [1, 2, 3, 4, 5]
console.log(numbers.splice(0,1)) // remove the first item
numbers.splice(0,1)
console.log(numbers) // remove the first item
```
```
```js
```js
const numbers = [1, 2, 3, 4, 5, 6];
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
numbers.splice(3, 3, 7, 8, 9)
console.log(numbers) // -> [1, 2, 3, 7, 8, 9] //it removes three item and replace three items
```
```
#### Adding item to an array using push
#### Adding item to an array using push