So this week I learnt mostly about closures, execution contexts, callbacks and functional programming. Returning functions from my functions, giving my functions functions, accessing function variables outside the function. All in all it was a bit of a recursive captain my captain moment. I am really starting to see the raw power of JS.
Also how libraries like underscore.js can help us supercharge our code and give us functions and helper sprinkles. Although part of my journey was about going back to fundamentals before launching into react so it’s interesting to how quickly I am back to dependencies. Like yeah I get it why build out a ton of helpers which I might get wrong when I can type
.each([1, 2, 3], alert);
All for a payload of 6.5kb in minified code.
But as mentioned in the course, all of underscore.js is available as annotated source code so we can understand what’s going on at a fundamental level and indeed learn along with it.
My head is hurting this week and some of the concepts we learned were quite overwhelming. But already when looking at my own code I seem to be reading it clearer understanding the structure better rather than a string of letters and punctuation.