re: There's no "else if" in JS VIEW POST

re: I believe you misunderstand what “design flaw” means. The necessity to choose between "LOVELY" and "CUTE" inside a single function in the aforement...

Can you provide an example of a good solution please!

Can you state the problem to be solved in the first place? There is no silver bullet, nor a pill. I just stated that every single problem might be better solved without ifs.

Actually I didn’t misunderstand. I was really just having a little coding fun at your expense because I disagree with your statement. Personally, I believe that anyone that states something along the lines of “never do xyz no matter the circumstance” (not your exact words, I know) has a flawed approach to design and development. Decision/branching is a normal part of what we do. Whether you use an if statement or some other form becomes trivial in the grand scheme. I agree that it is not always the best way but equally disagree that it is always wrong.

code of conduct - report abuse