Home > Web Front-end > JS Tutorial > What are variables in javascript

What are variables in javascript

王林
Release: 2023-01-07 11:42:36
Original
2115 people have browsed it

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.

What are variables in javascript

#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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template