码迷,mamicode.com
首页 > 编程语言 > 详细

[Js高手之路第一部]JavaScript上百例实战【新版】_2 javascript变量命名&使用规则

时间:2018-05-06 13:28:33      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:ons   har   oct   tle   col   end   nbsp   span   style   

 

变量

1,什么是变量

变量是内存中用来存储数据的一块区域

2,变量的命名规则

3,怎么使用变量

var 变量名 =(赋值) 10

 

 1 <!DOCTYPE html>
 2 <html lang="en">
 3 <head>
 4     <meta charset="UTF-8">
 5     <title>Document</title>
 6     <script>
 7             var name=‘name‘;
 8             var age=10;
 9             var gender=‘male‘
10             console.log(name);
11             console.log(age);
12             console.log(gender);
13     </script>
14 </head>
15 <body>
16     
17 </body>
18 </html>

 

[Js高手之路第一部]JavaScript上百例实战【新版】_2 javascript变量命名&使用规则

标签:ons   har   oct   tle   col   end   nbsp   span   style   

原文地址:https://www.cnblogs.com/denggelin/p/8997845.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!