I don't think replacing "if"/"else if"/"else" conditions with yours is the best.
There is reason we use these known conditions nowadays. It is easy to read. But you are right, it is not always easy to read. I would replace your so-called bad code (the first one of-course) with code which uses only "if" conditions. There is no need to use "else if" when the "if" ones would execute "return" statements.
Some comments have been hidden by the post's author - find out more
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.
I don't think replacing "if"/"else if"/"else" conditions with yours is the best.
There is reason we use these known conditions nowadays. It is easy to read. But you are right, it is not always easy to read. I would replace your so-called bad code (the first one of-course) with code which uses only "if" conditions. There is no need to use "else if" when the "if" ones would execute "return" statements.