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!
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
Ryan Smith1,936 Points
Why are the parentheses needed in this line of code?
I feel stupid asking, but can someone explain why the parentheses are needed here to enforce addition instead of concatenation? Since after using parseFloat the two input variables become floats instead of strings, and they aren't otherwise turned into strings that I can understand?
message += input1 + " + " + input2 + " = " + (input1 + input2);
turaboy holmirzaev18,412 Points
Lucas GuimarãesFront End Web Development Techdegree Student 3,900 Points
I think it