1. Intro to the JavaScript Engine

1-intro-to-javascript-engine

Intro to JavaScript Engine

A Quick Note on Using AI Tools

AI is a thing and We encourage students to leverage AI tools like ChatGPT for learning enhancement, not for completing assignments. Use ChatGPT to clarify concepts, understand programming paradigms, or explore different coding approaches. However, avoid using it or code completion tools like Codium and Copilot to directly solve your assignments. These tools, while powerful, may impede your problem-solving skills development crucial in the early stages of learning.

Good Question Example: "Can you explain the concept of recursion in programming?" Bad Question Example: "Can you write a recursion function for me?"

Eventually, as you become more proficient, integrating these tools into your workflow can significantly boost your efficiency and code quality.

Alright, back to the regular scheduled programming.

Before we actually start building anything useful in JavaScript, it will be helpful to first learn how things work under the hood.

Our theory is, if you can understand how the JavaScript engine reads your code, then you can understand how any piece of JavaScript will run, without guessing. And if you can understand any JavaScript code, then you can read any JavaScript - and ultimately, if you can read any JavaScript, you can write any JavaScript. We'll go slow now, to go fast later.

Event Loop Video

We're going to start out by having you watch this video by Philip Roberts - it's one of the only times we'll have you utilize an outside video. Though this video is a few years old now, it's one of the best resources for learning how JavaScript works under the hood and it will be our guide for a majority of this section.

Then, after watching his video, we'll slowly dissect the following topics from his talk:

  • The Call Stack
  • Blocking
  • Asynchronous Callbacks
  • Concurrency and the Event Loop

So go ahead and watch the video, in full, now before moving on to the next section!

Complete and Continue