is an array just another form of object when it comes to the relationship between arrays and objects in javascript? Why do arrays have key?? Why is the final printed result the same? Ask the great god to answer this question about the array.
let arr=["a","b","c","d"]
let obj={
"0":"a",
"1":"b",
"2":"c",
"3":"d"
}
for(let key in arr){
console.log(arr[key])//a,b,c,d
}
for(let key in obj){
console.log(obj[key])//a,b,c,d
}