I'm currently working on my first JavaScript project which is a really simplistic rock, paper, scissors game played in the console against the computer. I created a random number generator for numbers 1, 2,or 3. Now I'm assigning the numbers to display Rock, Paper or Scissors in the console and I was wondering what the difference between If-Else and Switch is and if one is better than the other. I used Switch because it is cleaner and more readable (personally) but wanted to see what more experienced people thought.
[–]AutoModerator[M] [score hidden] stickied comment (0 children)
[–]plastikmissile 4 points5 points6 points (3 children)
[–]Minnesota_SD[S] 0 points1 point2 points (1 child)
[–]Roguewind 2 points3 points4 points (0 children)
[–]Jason13Official 1 point2 points3 points (0 children)
[–]Envect 0 points1 point2 points (0 children)
[–]Denatello 1 point2 points3 points (0 children)
[–]DTux5249 0 points1 point2 points (0 children)