函数调用函数自身,就叫递归
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
function show(){
// 函数调用函数自身,就叫递归
setTimeout(function(){
console.log(1)
show();
},1000)
}
show()
</script>
</body>
</html>