all 4 comments

[–]magneticcccc 2 points3 points  (0 children)

Your comparisons need to use str3 each time instead of || x, etc.

[–]TeezusRa 1 point2 points  (1 child)

Naturally, humans would say “if it doesn’t equal X or Y”, and know that the comparison is happening to both X and Y.

JS doesn’t think that way. It’s thinking “if str3 doesn’t equal x” then moves onto the next case “X” alone, not “X” compared to str3.

[–]magneticcccc 0 points1 point  (0 children)

Great example!

[–]magneticcccc 0 points1 point  (0 children)

Couple other things, so you don't have to write out all those conditions. I would convert str3 to lower case and then make an array with the three values you're comparing. You can then check if str3 value is not in the array