Whenever you access a variable JavaScript uses something called the scope chain to determine which variable you are referring to.

The scope chain works like this, JavaScript starts looking for the variable in the scope in which it is called, if it can’t find it within that scope it moves up to the next level and looks there, it keeps doing this until it hits the global space, and if it can’t find it in the global scope it throws an error.

I think that the ODB captured this perfectly when he said “You see my name is something that…

Hey y’all, this week I am kicking off a series of articles on the JavaScript Engine, Scope, the differences between var, let, and const in JavaScript. I think that the best place to start this series is with an explanation of the JavaScript Engine and how it works. So let’s get to it!

In a way, the JavaScript Engine works kinda like your body does.

You put food in, and it gets converted to energy like magic, and then you go around and do stuff. You probably have some basic understanding of how that happens, but you probably don’t understand it on a molecular level. …

An introduction to JavaScript classes, extends, and super

Hi y’all, I am back today with the second part of my introduction to JavaScript Classes.

Today, I am going to cover child classes, inheritance, the extends, and the super keywords. So, without further ado, let’s get this party started.

In my last post, I compared JavaScript classes to Chipotle. As a matter of fact, I said “I like to think of a class as being like Chipotle; people go in, and they come out with burritos.” Well as you probably know, you are not limited to burritos at Chipotle. …

Wu-Tang Clan + JavaScript Classes = Wu-Tang Class

When I first started working with JavaScript, I had a hard time understanding classes. I didn’t understand what they were, how they worked, or why you would use them; in this article, I am going to cover just that.

I like hip hop, so let’s say that we want to create an object that represents my favorite hip hop artist, the RZA from the Wu-Tang clan.

Image for post
Image for post

We could create an object literal that looks like this.

Joseph Haefling

I am a front-end software engineer, a former social worker, an amateur musician, a foodie, and a recent graduate of Turing School of Software and Design.

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