Variables in JavaScript are containers used to store data. They can be used to store values and expressions. Variables must start with a letter, and variable names are case-sensitive.
#The operating environment of this article: windows10 system, javascript 1.8.5, thinkpad t480 computer.
Variables are "containers" used to store data. As with algebra, JavaScript variables can be used to store values (such as x=5) and expressions (such as z=x y).
Variables can have short names (such as x and y) or more descriptive names.
Note:
Variables must start with a letter
Variables can also start with $ and _ symbols (but we don’t This is recommended)
Variable names are case sensitive (y and Y are different variables)
Recommended related tutorials: js tutorial
The above is the detailed content of What are variables in javascript. For more information, please follow other related articles on the PHP Chinese website!