From 237b237ee8df941c6b6a3bce5ba7c621de19f500 Mon Sep 17 00:00:00 2001 From: Isaac Good Date: Thu, 19 Jun 2025 10:26:45 -0700 Subject: [PATCH] Train Driver: fix typos and minor corrections --- exercises/concept/train-driver/.docs/instructions.md | 4 ++-- exercises/concept/train-driver/train-driver.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/concept/train-driver/.docs/instructions.md b/exercises/concept/train-driver/.docs/instructions.md index 186c112501..d9d89dea21 100644 --- a/exercises/concept/train-driver/.docs/instructions.md +++ b/exercises/concept/train-driver/.docs/instructions.md @@ -19,7 +19,7 @@ The function should then return the given IDs as a single `array`. ```javascript getListOfWagons(1, 7, 12, 3, 14, 8, 5); -// => [1, 7, 12, 3, 14, 8, 3] +// => [1, 7, 12, 3, 14, 8, 5] ``` ## 2. Move the first two elements to the end of the array @@ -87,7 +87,7 @@ Your friend has noticed that they don't need the arrival time in the routing inf Therefore your friend would like you to separate the arrival time from the routing information. Implement a function `separateTimeOfArrival` that accepts an object with the routing information. -The function should return an array there the first element of the array is the arrival time and the second element is an object with the routing information without arrival time. +The function should return an array where the first element of the array is the arrival time and the second element is an object with the routing information without arrival time. ```javascript routeInformation = { diff --git a/exercises/concept/train-driver/train-driver.js b/exercises/concept/train-driver/train-driver.js index b91900164e..e44f07b03f 100644 --- a/exercises/concept/train-driver/train-driver.js +++ b/exercises/concept/train-driver/train-driver.js @@ -7,7 +7,7 @@ /** * Return each wagon's id in form of an array. * - * @param {number[]} ids + * @param {...numbers} ids * @returns {number[]} wagon ids */ export function getListOfWagons(a, b, c, d, e, f, g, h, i, j, k, l, m, n) {