递归出题
This commit is contained in:
63
teaching/jwl/课件/es6/letconst.html
Normal file
63
teaching/jwl/课件/es6/letconst.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<script>
|
||||
console.log(a)
|
||||
var a=9
|
||||
function a(){}
|
||||
|
||||
|
||||
// var num=2 //var 是js里面定义变量的关键字
|
||||
// console.log(num)
|
||||
// num=9
|
||||
// console.log(num)
|
||||
|
||||
// const num1=2 // 常量是定义以后值不能改变的量 声明的话 用const关键字
|
||||
// // 使用常量的时候,初始值不能为空 初始值为空的常量没有意义
|
||||
// console.log(num1)
|
||||
// num1=8
|
||||
// console.log(num1)
|
||||
|
||||
// var和let 都是用来声明变量的
|
||||
// var num=2
|
||||
// var num=8
|
||||
// console.log(num)
|
||||
|
||||
console.log(num,"llo")
|
||||
let num=2
|
||||
// let num=8
|
||||
console.log(num)
|
||||
// let 不能在同一个块级作用域中重复声明
|
||||
|
||||
for(var i=0;i<5;i++){
|
||||
let num=8
|
||||
console.log(num)
|
||||
}
|
||||
|
||||
function f(){
|
||||
let num=5
|
||||
let name="a"
|
||||
function g(){
|
||||
let name="b"
|
||||
console.log(name)
|
||||
function c(){
|
||||
// let name="c"
|
||||
console.log(name)
|
||||
}
|
||||
c()
|
||||
}
|
||||
console.log(num)
|
||||
console.log(name)
|
||||
g()
|
||||
}
|
||||
f()
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user