请老师检查
来源:2-7 编程练习
宣与慕
2022-04-11 09:42:43
<!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>
</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回答
好帮手慕慕子
2022-04-11
同学你好,代码实现是正确的,很棒!!!继续加油,祝学习愉快~