I restructured my data in "days" a few times and lost understanding of what I was dealing with. I thought that it was an object as I couldn't reference its contents with an index e.g
console.log(days[2].hour);
Firefox console says:
TypeError: days[2] is undefined
If it's an array after all, then I'll do some more reading about arrays. Thanks
Referencing the element using indexer 2 when there are only two elements using Option Base Zero, will yield undefined as a result, since there is only element zero and element one.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I restructured my data in "days" a few times and lost understanding of what I was dealing with. I thought that it was an object as I couldn't reference its contents with an index e.g
Firefox console says:
If it's an array after all, then I'll do some more reading about arrays. Thanks