Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Kanish Chhabra2,151 Points
Confusion with return values of the Switch statement
While using an enum, when we pass an enum value to a switch and return something from different cases, and then we use the returned value as a reference fo another function. My question is where do these return values are stored if we don't store them in a variable or a constant? https://teamtreehouse.com/library/getting-rid-of-strings please follow this video and I hope you'll understand what I am asking. Please help!
You have the option to store them in a variable or a constant but you don't have to do anything with the return values if you want, they will still perform whatever actions you put in the method but you can ignore the return value, its entirely up to you