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 trialBrian Herbert
3,834 PointsError on challenge or am I missing something?
I'm asked to create a variable named numWidth. I set the variable with
var numWidth = boxWidth.parseInt();
but the challenge is telling me I don't have a variable named numWidth and that I should set it with "var numWidth =...".
Clearly this is an error on the challenge, right?
Screenshot: http://cl.ly/image/2L22331V1p3O
1 Answer
Jason Anello
Courses Plus Student 94,610 PointsThe instructions probably should say function not method.
parseInt is a function that you call and pass in arguments.
var numWidth = parseInt(boxWidth, 10);
Brian Herbert
3,834 PointsBrian Herbert
3,834 PointsYes, that's it! Thank you.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsYou're welcome.
James Barnett
39,199 PointsJames Barnett
39,199 PointsNot sure who is looking after this course these days, tagging Jim Hoskins, Nick Pettit & Andrew Chalkley.