js with the mind

JS variables
1. The official definition:
in memory of the container with the name of the store, where the data is stored can be changed in the process of execution of the program
in fact is a container for storing data ·
All computer programs, data will be stored in a variable , the manipulated variable to manipulate the data by
syntax 2. define variable
var name = 'John Doe';: variable name called a proof, this data will Joe Smith, assigned to the name is stored, and the variable name is not equal to Zhang the three data
var: variable declaration keywords, tell the computer, I was the definition of a variable
name: the name of the definition of variables, then invokes the name of the variable data
=: call sign assignment in a computer program, the role of the right assigned to the left-side variable storage content
Zhang: data is stored in a variable
each other with a line of JavaScript is preferably separated by a semicolon
3. naming convention and standardized
rules must be followed:
the content of the variable name, only the digital letters (the case can be), underscore _ dollar sign $
can not start with a number, usually begin with a letter or an underscore
Yan Grid case-sensitive
Do not use reserved words and keywords: for example, can not be defined variable names called var
norms, comply with the recommendation
not to use Chinese
see the name EENOW: see variable name, you know that this is what the data
hump nomenclature: Multi variable-word names, the first letter of each word capitalized
UserName UserPwd
small hump: userName userPwd

Published 21 original articles · won praise 3 · Views 333

Guess you like

Origin blog.csdn.net/qq_44531034/article/details/104763343