More color choices case sensitivity

In the Javascript Building Blocks Conditionals module (https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/conditionals) there is the Active Learning: More Color Choices assignment. I noticed that there is a small problem with case sensitivity.

The choices for the variable “choice” are not given anywhere except the live output itself (through “select”). All of the choices there are with a first capital letter (“White”, “Black”…). When I wrote the code I checked that yes, it would need a capital letter when checking what “choice” is. Wrote the whole code, didn’t work. Checked the solution after a while of fiddling around with it. The only difference in the solution and my code was that the solution had no capital letters when checking “choice” (“white”, “black”…).

1 Like

I just got through that lesson and had the same issue.

I think this is a reasonable point; this could be a difficult stumbling block, which could make the exercise harder than it needs to be. I have added a note to the question to give a hint about case sensitivity.