当前位置:网站首页>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
边栏推荐
- 源码look me
- Experiment collection of University "Fundamentals of circuit analysis". Experiment 4 - Research on linear circuit characteristics
- 原神2.6服务端下载以及搭建安装教程
- day4
- Register as a harmonios developer and install deveco studio 3.0 beta2 for harmonios
- 基于 Nebula Graph 构建百亿关系知识图谱实践
- 智联招聘的基于 Nebula Graph 的推荐实践分享
- 使用FFmpeg命令行进行UDP、RTP推流(H264、TS),ffplay接收
- SQL FOREIGN KEY
- Various entanglements between qvariant and Jason -- QT
猜你喜欢

Boot 事务使用

How to import a billion level offline CSV into Nepal graph

The sea of stars hidden behind the nebula graph

《大学“电路分析基础”课程实验合集.实验七》丨正弦稳态电路的研究

数仓中的维度表与事实表

2020.4.12 byte written test questions B DP D monotone stack

Idea public method extraction shortcut key

微信v3native支付设置的结束时间处理办法

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

中科大脑知识图谱平台建设及业务实践
随机推荐
Soul torture, what is AQS???
由ASP.NET Core根据路径下载文件异常引发的探究
解决** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the defau
Recommended practice sharing of Zhilian recruitment based on Nebula graph
Comprehensively interpret the background and concept of service mesh
Floyed "suggestions collection"
Experiment collection of University "Fundamentals of circuit analysis". Experiment 7 - Research on sinusoidal steady-state circuit
如何实现十亿级离线 CSV 导入 Nebula Graph
源码look me
Group by的用法
(万字精华知识总结)Shell脚本编程基础知识
如何實現十億級離線 CSV 導入 Nebula Graph
《大学“电路分析基础”课程实验合集.实验七》丨正弦稳态电路的研究
将点云坐标转换成世界坐标的demo
Use ffmpeg command line to push UDP and RTP streams (H264 and TS), and ffplay receives
全是精华的模电专题复习资料:基本放大电路知识点
Huawei ECS installs mysqlb for mysqld service failed because the control process exited with error code. See “sys
How to use percona tool to add fields to MySQL table after interruption
数组和链表的区别浅析
SQLServer查询哪些索引利用率低