I am trying to understand why when I run the following code, none of the props return as true for being arrays. addresses and emails should return true I would think, and yet they return false.
let obj1 = {
name: 'John',
age: 42,
addresses: [],
emails: []
}
function findArrays(obj) {
for (let propName in obj) {
console.log(propName, Array.isArray(propName));
// All values console.log as false
}
}
findArrays(obj1);