+ 1
switch and default
switch and default is same as if and else... another way for to do??
2 Respuestas
+ 6
Pretty much.
But there's lots of things you cannot do with switch cases, that you can in if statements.
Switch is essentially heavily optimized, so a faster version of the if statement.
+ 1
ook thank youu😉👍