How to use if/else and switch in javascript

Not exactly sure if this applies to js runtimes (it sounds like it’s more for java or c++) but here’s an interesting explanation on switch vs if statements for comparison.

2 Likes

To be honest, that’s why I sent in a slightly flawed version of mine. The class will get INDEFINITELY harder and harder if you don’t go back and make sure you master these parts, which I learned the hard way when I first started learning Java. I double-checked my knowledge of the switch statement’s functionality in JavaScript by going back to the drawing board.

2 Likes

Ha that’s exactly how the #homework category’s supposed to work! :rofl:

1 Like

:laughing: sabotage

3 Likes

For everyone giving future homework help, make sure to explain how it works so they can learn for the next time.

1 Like

how you get frend

?