Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

can somebody please tell me what a switch statement is and what the switch-statement does? Thanks

Thank you

1 Answer

This video has a pretty good explanation of switch statements and how they work, at least better than I could explain. :p For the sake of not causing confusion, I'll just leave you to watch the video instead of trying to explain it my own way. It's in Java, but switch statements are the same in other languages with maybe a bit different syntax.