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 trialjoe osorio
Courses Plus Student 642 Pointsstrings / blocked on mi thnking
would like some help getting the string variable out of the "px" to separate the numeric value. need help!
2 Answers
Dino Paškvan
Courses Plus Student 44,108 PointsYou mean something like this:
var aString = "349px";
var intExtracted = parseInt(aString, 10); // we supply the radix implicitly to avoid JS making wrong assumptions
joe osorio
Courses Plus Student 642 Pointsthere you go i was missing the radix amount and the variable string that i was taking out from the variable!!!!!
thanks