Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const testArray = ['Silver', 'Happy', 'Xan', 'Kevin']
- const newArray1 = testArray.slice(0, 2)
- const newArray2 = testArray.slice()
- const newArray3 = testArray.slice(-1, 3)
- console.log(newArray1, newArray2, newArray3)
Add Comment
Please, Sign In to add comment