Task
Solution
Task
In this challenge, you were provided a primary color and you had to match it to its complementary secondary color.
Solution
Let’s go over the solution step-by-step.
The first thing you had to figure out is that this problem requires a match expression.
Next, you had to figure out the number of cases the match expression would require to cover all the possible scenarios. We had one case for each primary color along with a default case if the input was anything but a primary color.