1. Variables
https://javascript.info/variables
-
A variable is a “named storage” for data. We can use variables to store goodies, visitors, and other data. To create a variable in JavaScript, use the
let
keyword. -
命名:
(1)只能是字母、数字或者$ 和 _
(2) 第一个字符不能是数字
(3)常用的是驼峰命名规则
(4)区分大小写
(5)严格模式下,使用未声明的变量,会报错
网友评论