Coding Tip: Try to Code Without If-statements

You might uncover better solutions

Samer Buna
Sep 7, 2017 · 5 min read
Code from a Facebook project. Please don’t sue them.

Update: This article is now part of my book “Learn Coding with Modern JavaScript”.

Read the updated version of it at

When I teach beginners to program and present them with code challenges, one of my favorite follow-up challenges is: Now solve the same