JavaScript Lesson #2: Declaring a Variable in JavaScript

Опубликовано: 15 Октябрь 2024
на канале: GreeneMath.com
914
17

http://www.greenemath.com/

  / mathematicsbyjgreene  

In this lesson, we will learn how to declare a variable in JavaScript using var, let, and const. Additionally, we will explore some basic differences between var and let. Both var and let allow for a variable to be reassigned, however we can only declare a variable with let once. When we work with const, the variable is read only and can't be changed. It's value will be constant throughout our program.