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

Angela Freeman
Angela Freeman
1,666 Points

I am getting an error for entering the instructed let values in DEV tools in the console.

I entered this: let score = 5; score += 10;

let score = 20; console.log(score);

and I'm getting 2 errors for entering this. Also the console always wants to add the yellow errors to the code I enter. It looks nothing like what you're doing.

2 Answers

Steven Parker
Steven Parker
231,210 Points

You should only declare a variable once, so try leaving off the second "let".

victor E
victor E
19,145 Points

when you use the words 'let', 'var', 'const', you are creating a brand new variable, and a new place in memory. If you use the same variable again in the future you will not need to use these in front of the variable name since you are no longer declaring it nor creating new space, but rather using, or changing its value.