Hello, fellow campers,
What is the real difference between Switch and If statement
Thanks and Happy Coding!
Hello, fellow campers,
What is the real difference between Switch and If statement
Thanks and Happy Coding!
switch cases are rigid and streightfoward, one variable equal to a value
if statements have conditions much more flexible
What you mean by this?
in a switch you can just compare a variable to a series of values