Merge pull request #26 from npnjuguna/npnjuguna-slice-array-elements-example-fix

slice array elements example fix
pull/29/head
Asabeneh 5 years ago committed by GitHub
commit 105f411e3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -490,8 +490,8 @@ Slice: To cut out a multiple items in range. It takes two parameters:starting an
```js
const numbers = [1,2,3,4,5]
console.log(numbers.slice() // -> it copies all item
console.log(numbers.slice(0) // -> it copies all item
console.log(numbers.slice()) // -> it copies all item
console.log(numbers.slice(0)) // -> it copies all item
console.log(numbers.slice(0, numbers.length)) // it copies all item
console.log(numbers.slice(1,4)) // -> [2,3,4] // it doesn't include the ending position
```

Loading…
Cancel
Save