当前位置:网站首页>JS learning notes - variables
JS learning notes - variables
2022-07-02 16:01:00 【Dumb monkey】
summary
The essence : Variables are programs In memory A piece of the application is used for Storing data Space .
Declare variables
var age; // Declare a name as age The variable of
var It's a JS keyword , be used for Declare variables ( variable The meaning of a variable is ). After using this keyword to declare variables , The computer automatically allocates memory for variables .
Variable initialization
var age = 18; // Declare the variable and assign it to 18
Declare a variable and assign a value , We call it Initialization of a variable .
Update variables
After a variable is reassigned , Its original value will Be overwritten , The value of the variable will be based on the last assigned value .
Declare multiple variables at the same time
When multiple variables are declared at the same time , Just write one var, Use... Between multiple variable names Comma separated .
var age = 10,name = 'ZS',sex = 2;
Declare variable special case

Variable naming conventions
By letter (A-Za-z)、 Numbers (0-9)、 Underline ( )、 Dollar symbol ($ ) form
Case sensitive .
Cannot start with a number .
It can't be a keyword 、 Reserved words .
Variable names must have meaning .
Follow the hump nomenclature . Initial lowercase , The first letter of the following words needs to be capitalized .eg:myFirstName
边栏推荐
- XPT2046 四线电阻式触摸屏
- 中科大脑知识图谱平台建设及业务实践
- [5g NR] RRC connection release
- 蚂蚁集团大规模图计算系统TuGraph通过国家级评测
- 【小白聊云】中小企业容器化改造建议
- Ssh/scp does not prompt all activities are monitored and reported
- 数字藏品系统开发(程序开发)丨数字藏品3D建模经济模式系统开发源码
- Use ffmpeg command line to push UDP and RTP streams (H264 and TS), and ffplay receives
- locate: 无法执行 stat () `/var/lib/mlocate/mlocate.db‘: 没有那个文件或目录
- Locate: cannot execute stat() `/var/lib/mlocate/mlocate Db ': there is no such file or directory
猜你喜欢
![[development environment] install Visual Studio Ultimate 2013 development environment (download software | install software | run software)](/img/26/3f19d36c048e669c736e27384e0fa7.jpg)
[development environment] install Visual Studio Ultimate 2013 development environment (download software | install software | run software)

处理gzip: stdin: not in gzip formattar: Child returned status 1tar: Error is not recoverable: exitin

Experiment collection of University "Fundamentals of circuit analysis". Experiment 6 - observation and measurement of typical signals

Idea jar package conflict troubleshooting

如何實現十億級離線 CSV 導入 Nebula Graph

Experiment collection of University "Fundamentals of circuit analysis". Experiment 7 - Research on sinusoidal steady-state circuit

Write your own CPU Chapter 11 - learning notes

Practice of constructing ten billion relationship knowledge map based on Nebula graph

Processing gzip: stdin: not in gzip format: child returned status 1tar: error is not recoverable: exitin

又是一年毕业季
随机推荐
PHP static members
Usage of group by
Add an empty column to spark dataframe - add an empty column to spark dataframe
《大学“电路分析基础”课程实验合集.实验六》丨典型信号的观察与测量
/Bin/ld: cannot find -lssl
Pyobject to char* (string)
Make p12 certificate [easy to understand]
Figure database | Nepal graph v3.1.0 performance report
AWS云主机扩容
Flink real-time data warehouse (7): Flink realizes the full pull module to extract data in MySQL
《大学“电路分析基础”课程实验合集.实验五》丨线性有源二端网络等效电路的研究
GraphX 图计算实践之模式匹配抽取特定子图
蚂蚁集团大规模图计算系统TuGraph通过国家级评测
【idea】推荐一个idea翻译插件:Translation「建议收藏」
Multi data source configuration code
解决BASE64Encoder报错的问题
Application of visualization technology in Nebula graph
day4
locate: 无法执行 stat () `/var/lib/mlocate/mlocate.db‘: 没有那个文件或目录
可视化技术在 Nebula Graph 中的应用