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 (Retired) Storing and Tracking Information with Variables Naming Variables

Roger Hwang
Roger Hwang
3,851 Points

Should we be using "let" and "const" now instead of "var"? What will be accepted in this curriculum?

Javascript ES6

4 Answers

Steven Parker
Steven Parker
231,271 Points

In most cases where scope is not an issue, you can use "var"; but it would be good practice to use "const" whenever you can (when the value will not be changed) and "let" otherwise.

Gabriel C. Cavallo
Gabriel C. Cavallo
4,438 Points

I undestand that this material was prepared before let and const came out, however you could at least set the interpreter to understand let and const. I get syntaxError if I use them

Steven Parker
Steven Parker
231,271 Points

You can send comments or questions directly to the staff as described on the Support page.

I understand your point and I agree with you, however, on the other side, It's good to learn JS from scratch, step by step.