November 2018
Intermediate to advanced
566 pages
17h 15m
English
If–ElseIf–Else works when you have outcomes coming in categories (weekdays being five days, weekends being two). When the outcomes are specific and/or too many in number, it could be a little tedious to use the If–ElseIf-Else construct. To understand this better, let's give ourselves a scenario.
The dress code at your workplace is decided by a child, who likes everyone wearing the colors of the rainbow. Since she does not like anyone working weekends, she's not a big fan of orange, and absolutely hates yellow. She has come up with the following scheme (she doesn't know of Monday Blues yet): red on Mondays, violet on Tuesdays, indigo on Wednesdays, blue on Thursdays, green on Fridays, and ...
Read now
Unlock full access