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
no need to put a check for the first value collected? if it is a string, no need to put the 2nd number
conditional statement for the variables.
Steven Parker228,001 Points
If you wanted to check each input individually, you could of course skip the second input if the first one did not meet the requirements. It's a bit more work, but it would provide more immediate feedback to the user.
I also tried to add a condition to the first input so that if it's a string the second dialogue wouldn't appear as well as the message wouldn't be created. But I either have the problem that the second prompt is still executed but the message wouldn't appear or vice versa. I'm not sure how to get it straight. Suggestions?