The runtime is the code that runs your JavaScript. Dive into the call stack, try catch and throw, the event loop, timers and what it means to be asynchronous.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
async_sync
basic
call_stack
events
throw_try_catch
timers
README.md

README.md

Class: The JavaScript Runtime

JavaScript


The JavaScript runtime is the code that runs our code. In NodeJS or the Chrome browser, JavaScript is powered by an open source project from Google called V8. In this class we'll explore the parts of the runtime that affect our applications the most. We'll dive into the call stack, try catch and throw, the event loop, timers and what it means to be asynchronous.

What's in this class?

  • What is a Runtime? - In this video I'll introduce The JavaScript Runtime class. A runtime is the code that runs our code. In NodeJS or the Chrome browser, the runtime is written in C++ in a project called V8. In this class you'll learn about the parts of the runtime that affect our application code.

  • Getting Set Up - Learn how to download and run the examples from this class.

  • The Call Stack - The call stack is a data structure used by the runtime for calling and returning from functions.

  • Jumping the Call Stack with Try, Catch and Throw - Normally we think of try, catch, and throw only for error handling. But we're actually just jumping to a previous point in the call stack.

  • The Event Loop - Evented systems were invented to implement graphical user interfaces. Learn how the event loop works together with a task queue and the call stack in the JavaScript runtime.

  • Using Timers - Learn how setTimeout and setInterval work with the task queue and event loop.

  • Asynchronous Code - Explore the difference between asynchronous and synchronous code. Learn what work can be done in parallel with our application code.