How can we help?

Why do I need variables in a JavaScript program? Isn't it easier to just type the number?


Variables introduce an element of change into your program. By using variables, you can store data, make animations, create games, etc. Variables are also useful for maintaining your code. By creating a variable, you can easily change a value which is used in many places throughout your code.