Yeah, me too, for sure!
But the idea of this post was just to show that we don't need to always use else, that's why I didn't use the ternary operation there
Yes helpful because it reduced the code branch by 1 and also indentation is reduced. The read to write code ratio is like 10:1, hence it makes a big difference while reading code.
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.
Yeah, me too, for sure!
But the idea of this post was just to show that we don't need to always use
else
, that's why I didn't use the ternary operation thereYes helpful because it reduced the code branch by 1 and also indentation is reduced. The read to write code ratio is like 10:1, hence it makes a big difference while reading code.