webveuje/teaching/jwl/课件/js/digui.html
2021-04-09 16:36:34 +08:00

45 lines
1.0 KiB
HTML

<!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>
function jiecheng(n){
if(n==1){
return 1
}else{
console.log(arguments.callee)
return n*arguments.callee(n-1)
// 5*5-1 5*4
// 5*4*3
// 5*4*3*2
// 5*4*3*2*1
}
}
// 5*4*3*2*1
// function jc(n){
// if(n==1){
// return 1
// }else{
// return n*a(n-1)
// // 5*5-1 5*4
// // 5*4*3
// // 5*4*3*2
// // 5*4*3*2*1
// }
// }
var jc=jiecheng
jiecheng=null
var sum=jc(5) //120
console.log(sum)
</script>
</head>
<body>
</body>
</html>