Blogger Information
Blog 23
fans 0
comment 0
visits 13625
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
20191021作业
王长中的博客
Original
669 people have browsed it

javascript基础知识点练习:

1,变量,语句,表达式:

实例

<script>
var age=18;
console.log('我的年龄'+age+'岁')
if (age>20){
console.log('我可以结婚了')
else
{
console.log('还得等两年')
}
</script>

运行实例 »

点击 "运行实例" 按钮查看在线实例

E225[MGXC3PL4C75157L%QX.png

2,函数定义及调用,匿名函数

Y74]~0$V@VJAN$9LG(HHZLF.png

9W1OGOC0U_9F1@OQ{1U6T17.png

注意:匿名函数不能单独存在;当将匿名函数赋值给一个变量,在调用这个变量时,变量名后面要加上();


Correction status:qualified

Teacher's comments:学好js, 一定要理解表达式的概念
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post