手写loadsh函数的第二天
<script>
const arr = [1, 2, 3];
function head(arr) {
const newArr = [];
if (newArr != []) {
for (let i = 0; i < arr.length; i++) {
return arr[0];
}
}
}
console.log(head(arr));
</script>