1
1
Fork 0
exercism/jq/remote-control-car/HINTS.md
Christina Sørensen 215e3d084b
feat(jq): remote-control-car
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2024-12-09 19:05:58 +01:00

29 lines
No EOL
914 B
Markdown

# Hints
## 1. Create a brand-new remote controlled car
- The result can use a constant object.
## 2. Create a brand-new remote controlled car with a nickname
- Consider calling the 0-arity function and piping the result to assign the nickname.
## 3. Display the distance
- [String interpolation][string-interpolation] would be useful here.
## 4. Display the battery percentage
- The [if][if-then-else] expression is needed.
## 5. Driving changes the battery and distance driven
- [Arithmetic update-assignments][update-assn] will be useful here.
## 6. Account for driving with a dead battery
- If the battery is dead, it should return the object unchanged.
[string-interpolation]: https://jqlang.github.io/jq/manual/v1.7/#string-interpolation
[if-then-else]: https://jqlang.github.io/jq/manual/v1.7/#if-then-else-end
[update-assn]: https://jqlang.github.io/jq/manual/v1.7/#arithmetic-update-assignment