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!
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
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