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 trialCarlos Lantigua
5,938 PointsEvaluate my code please
Took me a while to get this because I always forget to add the last remaining bracket (so much easier to see in VS code and atom. Could someone please give me any pointers as to if my code looks good or if they see any way I could possibly shorten it? Thank very much.
updated with snapshot, sorry
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 Pointsor put it on github
2 Answers
Carlos Lantigua
5,938 PointsThanks guys I just edited my post. Sorry I didn't even know what that snapshot feature was haha, thanks again.
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsI think you should check to see if the parameters are numbers, and throw an error if they're not, before you do anything else.
Carlos Lantigua
5,938 PointsJust to be clear, do you mean to move the if statement to be first on the code block before everything else? Thank you for your time btw, I really appreciate it.
Jason Anders
Treehouse Moderator 145,860 PointsJason Anders
Treehouse Moderator 145,860 PointsHi Carlos,
The Community is a great place to get feedback and advice on your code; however, Workspaces are private and can only be accessed by you, so the link you provided above just leads to a 404 Error.
If you want to share your Workspace, you'll need to take a snapshot of that Workspace and post that link here.
Keep coding! :)