A new requirement comes in! Employees have been asking for extra customizations, they want to be able to specify:
- the size of the bike, and
- the type of rear shocks of a mountain bike.
This is a relatively simple requirement, but you can already see having to add JS code in a couple of different places. It is easy to forget something, especially when there 10 options instead of 2 in this example.
Implement requirement and decrease the number of lines of JavaScript.
You can do this by creating CSS classes that specify which fields are visible for each type of bike.
Good luck!