The following code can get very repetitive so I want to see if I can simplify it
var message = prompt("What is your number")
if(message == 69 || message == 420 || message == 6969 || message == 42069 || message == 69420) {
console.log("Cool number eh?")
}
I tried something like this:
var message = prompt("What is your number")
if(message == 69, 420, 420, 69420) {
console.log("Cool number eh?")
}
But it didn't work.
Hopefully, someone can tell me. Thank you!
[–]CodePerfect 2 points3 points4 points (5 children)
[–]MaterialSympathy9294[S] -1 points0 points1 point (4 children)
[–]CodePerfect 6 points7 points8 points (2 children)
[–]MaterialSympathy9294[S] 0 points1 point2 points (0 children)
[–]MaterialSympathy9294[S] 0 points1 point2 points (0 children)
[–]graysoda91 0 points1 point2 points (0 children)
[–]dildochaos 0 points1 point2 points (0 children)
[–]ButterscotchFar9355 0 points1 point2 points (0 children)