DEV Community

Discussion on: There's no "else if" in JS

Collapse
 
sanderintveld profile image
Sander in 't Veld

This is really baffling me. What is the alternative? I don't think programming languages can be Turing complete without some sort of if-statement.

The only realistic way I can interpret your comment is that we should only use switch-statements, but that would just lead to

switch (condition)
{
  case true: ...
}
Collapse
 
thebadgateway profile image
Will F

Switch is the way to implement the "else if" construct :)