Correcting teacher:天蓬老师
Correction status:qualified
Teacher's comments:
<?php
$nums=[1,2,3,4,5,6];
$cars=["BWM","AUDI","Volvo"];
for ($i=0; $i <count($nums) ; $i++) {
echo $nums[$i].'<br>';
}
foreach($cars as $car)
{
echo $car.'<br>';
}
echo "<hr>";
?>
<!DOCTYPE html>
<html lang="zh-CN">
<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>
<ul class="list">
<li class="item">item1</li>
<li class="item">item2</li>
<li class="item">item3</li>
<li class="item">item4</li>
<li class="item">item5</li>
</ul>
<script>
const arrs = document.querySelectorAll(".item");
console.log(arrs);
arrs.forEach((elments) => console.log(elments));
for (let index = 0; index < arrs.length; index++) {
const element = arrs[index];
console.log(element);
}
</script>
</body>
</html>