请老师检查代码
来源:2-7 编程练习
xcn_aaaa
2022-10-14 09:56:14
<!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>
const arr = ["i", "m", "o", "o", "c"]
// 在此补充代码
for(const[index,value] of arr.entries()){
if(value == 'o'){
arr[index] = value.toUpperCase();
break;
}
}
console.log(arr)
</script>
</body>
</html>1回答
同学你好,代码可以实现需求,很棒!继续努力,祝学习愉快!
相似问题