Ultimately, none of us knows what we’re doing. We all have a sense that we’re imposters in some part of our lives. We’re all guessing and doing whatever we can to stay engaged and grow. It’s ok to follow the turning path of your life and find fulfillment as you create it. This is my meandering path into being a professional full stack developer.
TL;DR When you refer to
thisin the global context, it refers to the global variable (which is
Windowin browsers). When you create a
thisrefers to the object’s scope.
When you call this on the root of a document, it refers to the document’s root object, in the case of our browser
this refers to
So if we create a function and add a variable to the global scope then we can call it using
Today’s coding lesson is about trusting yourself.
I’ve noticed a grumpy-making pattern in myself while I’m coding:
I’m given issue X. I understand the problem and I lay out some logic to solve X. I implement my code but inevitably it doesn’t work.
Ok, cool, I am a zen master as I start to fix, approaching both my thinking and the project from several different angles. I spend 5 hours methodically working my way through this code and ultimately get nowhere. By this time I’m frustrated enough to go ask a technical mentor for help.
In the span of an…