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

why do we need so many lines for one operation?

can't we just do score +=score "5" + "10";?

and why did we need all the bonusPoints? couldn't we just add another score line instead of creating an entirely different function?

sorry i'm just very confused

mouseandweb
mouseandweb
13,758 Points

If you'd add some context I'd love to chime in. At the moment we can't tell what it is you're referencing.

around the 1:21 & 3:04 marks

1 Answer

mouseandweb
mouseandweb
13,758 Points

I don't know what code you're referring to. Would you mind posting a link to the video or pasting the code here?