DEV Community

Discussion on: Stop using switches the wrong way, use this instead

Collapse
 
jamesthomson profile image
James Thomson

Your first code image switch statement uses colorPsychology when it should use color as the condition. Other than that, it's a good approach when your switch statement produces basic results 👍

My only other suggestion to your article would be to use actual code snippets instead of screenshots so readers with assistive technology can benefit.

Collapse
 
pallascodes profile image
Bernardo Torres

Oohh no, I uploaded the wrong image. Hahahah thanks for the comment