const digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
for (const index in digits) {
console.log(typeof digits[index]);
console.log(digits[index]);
}
console.log('========================')
const digitsz = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0];
for (const indexz in digitsz) {
console.log(typeof indexz);
console.log(indexz);
}
ok now the return of the first typeof is number while the second one is string i dont know why is that ?? while in the array its already numbers in there