Skip to content

Commit 4e1b623

Browse files
committed
Further fixes
1 parent 94163e1 commit 4e1b623

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Now the first two wagons in the `array` have to be moved to the back of the trai
2828
Your friend would be really grateful to you for fixing their mistake.
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`.
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.
3232

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

exercises/concept/train-driver/.meta/exemplar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
export function fixListOfWagons(eachWagonsID) {
2424
const [first, second, ...rest] = eachWagonsID;
25-
return [...rest, first, second];
25+
return [1, ...rest, first, second];
2626
}
2727

2828
/**

0 commit comments

Comments
 (0)