The only time you might need an explicit else in my experience is when one or more conditions do not contain logic to leave the context (e.g. a return, break, or continue), and you have a block of code which should only be executed if none of the conditions were met.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
However it's worded, it works. This article gives a good example: axelerant.com/resources/team-blog/...
Precisely.
The only time you might need an explicit
else
in my experience is when one or more conditions do not contain logic to leave the context (e.g. areturn
,break
, orcontinue
), and you have a block of code which should only be executed if none of the conditions were met.