Skip to content

Commit d73f782

Browse files
committed
Fixes and changes to instructions
1 parent b86a994 commit d73f782

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

config.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,18 @@
116116
"slug": "elyses-destructured-enchantments",
117117
"name": "Elyses Destructured Enchantments",
118118
"uuid": "d9b5cd13-2f2b-4034-a571-e66c847ed6f8",
119-
"concepts": ["array-destructuring", "rest-and-spread"],
119+
"concepts": ["array-destructuring"],
120120
"prerequisites": ["arrays", "functions", "objects"],
121121
"status": "beta"
122122
},
123+
{
124+
"slug": "train-driver",
125+
"name": "Train Driver",
126+
"uuid": "6cef6712-cf1d-4b3e-9ace-1de3450b4285",
127+
"concepts": ["rest-and-spread"],
128+
"prerequisites": ["array-destructuring"],
129+
"status": "beta"
130+
},
123131
{
124132
"slug": "elyses-looping-enchantments",
125133
"name": "Elyses Looping Enchantments",

exercises/concept/train-driver/.docs/instructions.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
# Instructions
22

3-
Your friend is a Locomotive Engineer who drives cargo trains between cities.
4-
Although your friend is great handling the trains, they aren't amazing handling the logistics computers and would like your programming help organizing the train and correcting mistakes in the data.
3+
Your friend Linus is a train driver who drives cargo trains between cities. Although they are amazing at handling trains, they are not amazing at handling logistics or computers. They would like to enlist your programming help organizing train details and correcting mistakes in route data.
54

65
```exercism/note
76
To practice, use the rest or spread operator to solve each of the tasks below.
87
```
98

109
## 1. Create a list of all wagons
1110

12-
Your friend has been keeping track of each wagon identifier, but they're never sure how many wagons they are going to have to process at any given time. It would be much easier for the rest of the logistics program to have the data to be returned as an array.
11+
Your friend has been keeping track of each wagon identifier (ID), but they are never sure how many wagons the system is going to have to process at any given time. It would be much easier for the rest of the logistics program to have this data packaged into a unified `array`.
1312

14-
Implement a function `getListOfWagons` that accepts an unknown amount of positive integers which are the IDs of each wagon.
13+
Implement a function `getListOfWagons` that accepts an arbitrary number of wagon IDs which are the IDs of each wagon.
14+
Each ID will be a positive integer.
15+
The function should then return the given IDs as a single `array`.
1516

1617
```javascript
1718
getListOfWagons(1, 7, 12, 3, 14, 8, 5);
@@ -20,15 +21,14 @@ getListOfWagons(1, 7, 12, 3, 14, 8, 5);
2021

2122
## 2. Move the first two elements to the end of the array
2223

23-
At this point, you are starting to get a feel for your friend's data and how it's used in the logistics program.
24-
The train ID system works by assigning the locomotive an ID of `1` and then assigning the remainder of the wagons a randomly chosen ID greater than `1`.
24+
At this point, you are starting to get a feel for the data and how it's used in the logistics program. The ID system always assigns the locomotive an ID of **1**, with the remainder of the wagons in the train assigned a randomly chosen ID greater than **1**.
2525

26-
But then your friend had to connect two new wagons to the train and forgot to update the system!
27-
Now the first two wagons in the `array` have to be moved to the back of the train, or everything will be out of order.
28-
Your friend would be really grateful to you for fixing their mistake.
26+
Your friend had to connect two new wagons to the train and forgot to update the system! Now, the first two wagons in the train `array` have to be moved to the end, or everything will be out of order.
27+
28+
Linus would be really grateful to you for fixing their mistakes.
2929

3030
Implement a function `fixListOfWagons` that accepts an array of the id of each wagon.
31-
It `return` an `array` where the 2 first elements repositioned to the end of the `array` and the locomotive is added to the front.
31+
It `return` an `array` where the 2 first elements repositioned to the end of the `array` so that the locomotive can be in the front.
3232

3333
```javascript
3434
eachWagonsID = [2, 5, 1, 7, 4, 12, 6, 3, 13];

0 commit comments

Comments
 (0)