0 of 8 problems solved • 0%

Exercise prompt

Unpack an Array

Array destructuring reads items into variables in position order.

Example

const sizes = ["small", "large"]; const [firstSize, secondSize] = sizes;
  • firstSize receives sizes[0]: "small".
  • secondSize receives sizes[1]: "large".

Your task

Destructure route into startCity and endCity, then display Route: Stockholm to Uppsala.