JavaScript: this is it by Delicious Insights

JavaScript: this is it

You’ll finally understand how this works in JavaScript… And you can bet it’s worth it!

Finally grok’ing this!

If a topic’s been, by itself and forever, the source of easily half the questions you see online about JavaScript, that topic has to be how this works. “Hey?! I just lost my this!“ or “what the—why is this like that now?!” are a dime a dozen. We come from other languages and cargo-cult our assumptions along.

Frankly, this is all because developers would rather die than read the docs. The behavior of this is clearly described… but not as crystal-clear as this course. 😉 At the language level, a single, simple rule governs the behavior of this. That’s it. Beyond that, APIs we use can alter that behavior to better suit their needs, as in the DOM or Node streams.

When you’re done with this course, you’ll be a certified Master Of This™, and won't ever get caught off-guard by how it behaves. Freedom!

Slides and code

We know that getting a solid grasp on underlying concepts and theory is just as important as knowing how to implement them, so the course goes back-and-forth between elements of lecture (a la Powerpoint) and concrete code examples that can run in either Node or browsers.

Not only that, but the contents of these slides strives to remain concise and offer a welcome complement to the more detailed explanations in the audio track, whilst allowing you to “follow” the course even if you’re watching it in a noisy environment.

All code samples are provided in addition to the videos. And you retain a free lifetime access to updates and upgrades we might put in later!

So what’s in this course?

The outline goes like this:

The Great Misunderstanding
  • Methods or functions?
  • First-order functions and function references
How do I know what this is?
  • One rule to bind them all: “Subject, verb, complement”
  • Common API tweaks (DOM events, Node streams…)
What about arrow functions?
  • Execution context
  • Lexical scoping
Explicitly defining this
  • call()
  • apply()
  • The forsaken binding operator
Ensuring a given this
  • bind()
  • Implementing bind()
  • Explicit binding at construction
  • Implicit binding using a field initializer and arrow function
  • Explicit binding using a decorator

FAQs

😎 Do I need prior JS experience?

If you never wrote JS or never had to wrestle with this, you likely won’t get all the juice out of this course. But if you ever stumbled on a this-related issue, or just wondered where its values came from, this course will help!

🦕 Is this course compatible with IE?

The world is not compatible with IE. 😜

In all seriousness though, 100% of this course is valid on IE. We’re talking about JS fundamentals here that have been true since the language first came to light.

However, post-2009 syntax (arrow functions, field initializers and decorators, specifically) won't work natively on IE: you'll need to transpile them with Babel, for instance.

🎁 Do you provide the code samples too?

Of course we do! Every section opening has a link to a Zip file with all the code samples for that section.

Some rare examples might not be runnable as-is (e.g. those assuming a database or something), but the vast majority can be run as-is in Node and/or a modern browser.

📥 Can I download the videos for offline viewing?

Yes! Every section opening contains a link to a Zip file with all the MP4 video files for that section, that you can download to view or review when you’re offline. Note that a low bandwidth is enough to watch them online, though, and that gets you extras like transcripts and related contents.

🆓 Do you offer free JS-related content?

Do we ever! Our tech articles on JavaScript are many and in-depth; you'll also find a number of videos from our conference talks or meetups about JavaScript, Node.js and the whole ecosystem. Some examples:

🎓 Do you do in-room trainings?

We sure do! We probably have the world’s most comprehensive JS training: 360° ES. 3 days to cover 100% of the language, including all the latest bells and whistles and all the nitty-gritty, for people who already use JS daily.

We also have Modern Web Apps about client-side rich web apps and PWAs, Node.js for the back-end API part (REST and GraphQL both) and Webpack for bundling, all of which are acclaimed by our trainees!

A course by Christophe

Christophe Porteneuve has been doing JavaScript since… JavaScript. And professionally since 1996. A former core team member on Prototype.js, co-author of a TC39 spec and world-renowned JS expert, he's got 15,000+ hours as a trainer and dozens of conference talks behind him. In this course, he makes sure to share his technical expertise with humor and clarity.