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 trial
Laura Henneberry1,808 Points
Wouldn't the answer be Syntax Error, because .5 is not a whole number?
for console.log( parseInt( '.5 FTE' ));
parseInt will attempt to convert the string into an integer. If the first character can't be converted into a digit then it will return
NaN - Not a Number
Since the period can't be converted to a digit it returns NaN.
If the string was '1.5 FTE' instead then it would return the number 1. The character 1 can be converted to a digit but the period can not so it stops right there.