1.区分大小写
var name="zhang";
var Name="ZHANG";
document.writeln(Name+"
");
document.write(name);
2.弱类型变量
全部的变量都用var关键字标示,JavaScript解释器会自动分配
3.句子的尾部分号是可选的
如:var name=23; or var name=23都可以
var name="zhang"
var Name="ZHANG"
document.writeln(Name+"
")
document.write(name)
4.代码可以嵌入在html中也可以引入js文件
javascript
4.1 code can be imported directly from another file
For example: The result is the same
5. Multiple variables can be declared at the same time
For example: var name="JerryZhang",age=23,sex="male";
document.write(name "
" sex "
" age);
6.can not be initialized
such as : var name;
document.write(name);
7 Variable definitions cannot use keywords or reserved words (note: I don’t know what reserved words are)
For example: html, title, history are all OK, but document is not;
Such as : var html="asp.net";
document.write(html);
8. Variables in JavaScript can store multiple types of variables
For example: var i=23;
document.write(i "
");
i="JerryZhang";
document.write(i "
");