
This video overviews what we will be learning in this course!
We will be using a package called live-server in our examples. This video demonstrates how to get it installed.
This video sets up our workspace for all of our examples.
This video shows a common issue that people often face in regards to how scoping and closures work in JavaScript.
The first scope-related topic we cover is the global scope. We discuss what it is, and why it can cause issues.
Next up, we talk about what scopes are, and how to create them!
IIFE’s are used to resolve scoping issues - and this video demonstrates their syntax and usage in depth.
Hoisting is an interesting JavaScript behavior that we explore in this video.
This video discusses the differences between statically and dynamically scoped languages.
Next up, closures! These are a very powerful tool in JavaScript - and in this video we take a look at what they are, how they’re used, and possible issues that you may have with them.
This video continues the previous lecture about how to understand closures.
In the final video, we discuss the new ES2015 block scoping feature - which gives us more control over how scopes are created and destroyed.
We first introduce the keyword, why it’s useful, and some of the issues a person may have with using it.
We finish our examples by showing more instances of how it can cause issues within your code if used improperly.
Three of the more interesting functions in JavaScript are bind, call and apply - and they get confused with each other! This video talks about what they are, and how they can be used to “change” this.
Bind is often a little more confusing than call and apply, so we continue the lecture by discussing more about how it is used.
ES2015 introduced a new type of function expression that affects the “this” binding. This video talks about how we can use it to resolve common issues.
We wrap up this section with a discussion about a proposed new operator in the JavaScript language - that we may be seeing implemented within the next few specifications.
The first thing we do is discuss object prototypes; what they are, and how they can be useful.
We finish our discussion about object prototypes with more examples of their use.
Next up, we discuss constructor functions, and the “prototype” property - which is very often a source of confusion.
Object.create is a new way, as of ES5, to create objects, and affect their prototype. In this video, we discuss that function in depth.
Finally, we talk in depth of how to achieve classical-style inheritance using prototypes, Object.create, and constructor functions.
ES2015 introduces a new way to define constructor functions with the “class” keyword. This video talks about the class keyword and how it’s used to simplify our code.
Do you want to dive into three of the trickiest aspects of the JavaScript language? From beginner to intermediate - this course will bring you up to speed on some of the must have knowledge of being able to write in it effectively, while demystifying some its most often-misunderstood constructs!
In this course, you will learn all about scopes, “this”, and prototypes! Training content often doesn’t dive into the specifics of the nature of these “advanced” features. However, it is my belief that this is necessary knowledge to be an effective JavaScript programmer!
My goal at the end of this course is that variable scoping, the usage of the “this” keyword, and the creation and use of prototypes is well understood from a ground up perspective without compromise. Simply by having a firm grasp on these aspects of the language, many issues that even years-long JavaScript developers face can be resolved easily!
We will discuss, in depth:
Scopes and Closures
Immediately-Invoked Function Expressions (IIFEs)
Hoisting
The “this” keyword
The call/apply/bind functions
The nature of the magical “new” keyword
Object and function prototypes