Correcting teacher:PHPz
Correction status:qualified
Teacher's comments:
<?php
echo 'foreach 遍历';
echo '</br>';
$arr = ['bmw越野','bmw轿车','bmw跑车'];
foreach($arr as $item){
echo $item."</br>";
}
echo '</br>';
echo 'for 遍历';
echo '</br>';
for($i = 0;$i <= count($arr); $i++){
echo $arr[$i]."</br>";
}
?>
<script>
let arr = ['bmw越野','bmw轿车','bmw跑车'];
for(let i=0;i<=arr.length;i++){
console.log(arr[i]);
}
</script>