Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
620hun81888yBecause more often than not we deal with booleans. However, I usually have an "everything else" case just to be safe.
-
Hey with a map from (condition -> lambda function) you can get fancy and skip the if else/switches all together. And when it works you kinda feel smarter than when you started.
no matter how big shot programmer you are, you 90% time you will only code
if(condition)
{
// do something
}
else
{
// do something else
}
undefined