dimanche 6 septembre 2015

What is the point of switch statements if you can just use if-else statements?

And what is the point of if-else statements if switch statements exist? Is there really a practical reason to have them both? It seems kinda redundant. What I'm trying to get at is, is one or the other essential for a certain scenario where the other just wouldn't work? And if so what is it.

Aucun commentaire:

Enregistrer un commentaire