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

JavaScript The Solution

run/view the practice and the strings

first, I open the solution workspace and run it - it doesnt work. why?? (i didnt change anything)...

second, i dont understand the strings... i learned Java before and i know that always " show even times.... like "string" (2 times) or "your number is: " + number + ", very good!" (4 times).

this is command from the solution:

message += "userNum1 + " + " + userNum2 + " = " + (userNum1+userNum2);

the " show 5 times. why?!? (the " after the sign +=) its not working, just notice...

thanks!

1 Answer

1) In the video's workspace all the lines in math.js are commented out instructions so there is nothing to run. In addition you will have to add the math.js script to index.html

2) The beginning quote before userNum1 shouldn't be there. I checked the video @3:50 and there isn't a quote in the solution.