I was just doing the ‘rock, paper, scissors’ exercise on the full stack course, and had a thought while inputing some parameters into an if statement. The answer to this particular exercise is to use the || or logical operator and to ask for one of three options. Could the same result be returned with either of the two codebytes below:
rather than writing:
Just thought there may be a short hand way to write this same code. Any help would be much appreciated.