0

Can a switch statement only compare using "=="?

I noticed that in the tutorial for switch they dont mention it comapring anything except "==".

25th Nov 2017, 8:22 PM
Matthew Tate
Matthew Tate - avatar
2 Answers
+ 2
Thats all it does
25th Nov 2017, 10:42 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 1
Yes. The purpose of a switch statement is for checking equality.
25th Nov 2017, 8:28 PM
Christian Parsons
Christian Parsons - avatar