Not all who wander are lost.

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.

The keyword this in Javascript can be a little slippery to wrap your had around at first.

TL;DR When you refer to this in the global context, it refers to the global variable (which is Window in browsers). When you create a new object with this refers to the object’s scope.

What Does this Do?

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 Window.

So if we create a function and add a variable to the global scope then we can call it using this

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…

Rachel Ralston

software engineer, blockchain nerd, diversity advocate, nihilist rainbow unicorn

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store