1.9 KiB
1.9 KiB
Hints
1. Get the first card
- This article has a good overview of array destructuring. You can find an example of basic variable assignment in the 'Basic Array Destructuring' section.
2. Get the second card
- You can use placeholders to ignore one or more values in the array.
- You can find an example here.
3. Swap the first two cards
- It's possible to swap two values in a single destructuring expression.
- You can find an example here.
4. Discard the top card
- There is a built-in operator that can be used to collect the remaining values in an array into a single variable.
- You can find an example here.