Sign in
Log inSign up

In how many ways can we implement the following if and else code? Forget optimisation.

Default profile photo
Anonymous
·Jul 4, 2018

What are all the possibilities?

Lang: JavaScript

if (x > 5) {
 /* do the right thing */
} else if (x > 50) {
 /* do the right thing */
} else {
 /* do the right thing */
}