I'm obviously not understanding how forEach works in JavaScript, because when I run the following code, I don't get any output at all. What am I misunderstanding or doing wrong? Thanks!
var id = [];
id['battery'] = [];
id['battery']['garage'] = 27;
id['battery']['attic'] = 88;
id['battery']['basement'] = 74;
id['battery']['office'] = 62;
id['battery']['hallway'] = 84;
id['battery'].forEach(function(value, room) {
console.log("value = " + value + " | room = " + room);
});