Stop Using Excess If-Statements

How to create readable and maintainable conditionals

Simdi Jinkins
JavaScript in Plain English
3 min readFeb 26, 2021

--

Imagine you have a function that is meant to act differently depending on the type of user. We could write a function like this:

--

--

I’m chisimdiri ejinkeonye, i write about tech, philosophy and thought-provoking ideas i struggle with.