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 Declaring Variables in JavaScript

Is let an abbreviation for something?

Would be interesting haha

1 Answer

Richard Verbraak
Richard Verbraak
7,739 Points

It is not an abbreviation like const is for constant. Let is actually used in formalized mathematics. Without bogging you down with mathematical details and the likes.

Let is used in mathematics as: let X be this and let Y be that. In a way, let and scope (which let and const are used for) goes hand in hand, the same way as it does in mathematics.

In mathematics, you let X be something else when entering a new formulae/idea. This also applies to coding, when the let variable only contains this value in this scope(formulae/idea) and not anywhere else.

Hopefully this doesn't sound like complete nonsense, I'm not that great of formulating my thought process towards others.