<!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 fn(){
let num1=1
for(let i in arguments){
num1=num1*arguments[i]
}
return num1
}
document.write(fn(1,2,3,4))
</script>
</body>
</html>
<!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>
for(let i=0;i<=100;i++){
if(i%7===0||i%10===7){
let arr=[i]
document.write(arr+" ")
}
}
</script>
</body>
</html>
<!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 fn(n){
if(n<=3){
return 1
}
else{
return fn(n-1)+fn(n-3)
}
}
document.write(fn(8))
</script>
</body>
</html>
12.11作业
最新推荐文章于 2024-08-16 19:02:09 发布