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 JavaScript Basics Storing and Tracking Information with Variables Define Variables with let and const

not working- Variables I'm following the instructions in the video but for some reason, the programs are not working.

const score = 5; console.log (score);

When opened from the workshop it should display the number 5 in the console but it's blank when I check it. This has happened before and I couldn't figure out why. any recommendations?

1 Answer

Sacha U
Sacha U
6,830 Points

Did you make sure to save the file before opening the website?

Steven Parker
Steven Parker
231,269 Points

Any time you have trouble with a workspace project, the best way to get help with it is to share a snapshot of your workspace. That link in the last sentence is to a video that explains how.

Sacha U
Sacha U
6,830 Points

Also i noticed a space between your console.log and the (). It should be attached.

Steven Parker
Steven Parker
231,269 Points

While no space is "best practice", having it is tolerated by JavaScript and won't cause a problem in itself.