Traditionally JavaScript has used var to define variables. Moving forward, we should not use that keyword. Instead, we should choose between using const and let.
In this chapter, you’ll start by learning why var is a bad idea, why it’s still there, and why we should avoid it. Then you’ll learn about the strengths, capabilities, and some limitations of using let. Finally, we’ll explore const and discuss when to use it instead of let.