Exerpad
Exercise 5 · Chapter: ArraysRequired+50 XP

Array Slice

You have this array already defined:

let numbers = [10, 20, 30, 40, 50, 60];

Use slicing to:

  1. Print the first 3 items of the array.
  2. Print the last 2 items of the array.

Expected output:

10,20,30
50,60

(Remember: logging a whole array joins the items with commas.)

Need a hint?
3 available · costs 5 XP each
javascript

Output
Run your code to see the output here.