From c45f0ff3e3fe1ff4e6d4af54d1fe579737dca6b9 Mon Sep 17 00:00:00 2001 From: meatball <69751659+meatball133@users.noreply.github.com> Date: Fri, 22 Sep 2023 21:41:46 +0200 Subject: [PATCH] Add links --- exercises/concept/train-driver/.docs/hints.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/exercises/concept/train-driver/.docs/hints.md b/exercises/concept/train-driver/.docs/hints.md index 099b4746fd..a80b5c2af0 100644 --- a/exercises/concept/train-driver/.docs/hints.md +++ b/exercises/concept/train-driver/.docs/hints.md @@ -7,11 +7,12 @@ ## 1. Create a list of all wagons -- Multiple arguments in the function parameters can be packed with the `...` operator. +- Multiple arguments in the function parameters can be packed with the [`...` (spread) syntax][spread-syntax]. operator. ## 2. Move the first two elements to the end of the array -- Using unpacking with the rest operator(`...`), lets you extract the first two elements of a `array` while keeping the rest intact. +- You can unpack a series of parameters using [a destructuring assignment (`...`)][destructuring-assignment]. + This lets you extract the first two elements of a `array` while keeping the rest intact. - To add another `array` into an existing `array`, you can use the `...` operator to "spread" the `array`. ## 3. Add missing values @@ -26,3 +27,6 @@ ## 5. Separate arrival time from routing information - To extract a value from an `object` while keeping the rest intact, you can use the rest operator(`...`). + +[spread-syntax]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax +[destructuring-assignment]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment