DEV Community

Discussion on: I have no idea what I'm doing, but here Goes #3 IT WORKS!!

Collapse
 
jamonjamon profile image
Jaimie Carter

Thanks for this advice, it's been valuable. Yes, the magic numbers would be a pain: I'd hate to see random numbers that aren't random, then try to figure out their meaning. I'll change that.

To be honest, I'm still baffled with Array.map(). Every explanation of it refers to creating a new array with manipulated elements from a source array, if that explanation makes sense. In this case, I don't understand why it works. Is the events.map function in my code an iteration, or is it an array, or both? I can't see the actual correlation between the MDN definition and what is happening in this code. It just works. Which is great, don't get me wrong, but I really need to understand the (in broadcast terms) signal flow - what goes from where to where and what happens to it between those points. What is the pattern?

Oh and the debugger. Wow. You can see step by step what is happening with any particular object and how it fits in with stack and when in the process surrounding objects are populated/defined/undefined. So good. Need to dig further into this.

Again, many thanks for the advice, it is appreciated.

Unfortunately for the] next week, I'm slammed with work, and won't have a whole lot of time to devote to this project. Maybe I'll get the gmail API connected.