This course has been updated! We now recommend you take the Deep JavaScript Foundations, v3 course.

Check out a free preview of the full Deep JavaScript Foundations course:
The "Partner Up for Scope" Lesson is part of the full, Deep JavaScript Foundations course featured in this preview video. Here's what you'd learn in this lesson:

In this challenge, students pair up with a colleague and explain scoping examples in JavaScript to each other.

Get Unlimited Access Now

Transcript from the "Partner Up for Scope" Lesson

>> Speaker 1: How do you feel so far about this process of asking these questions of bam and where foo is? You feeling a little bit more confident? Let's test that out. For those of you that are here in person, I want you to actually find somebody sitting next to you or get up and walk around.

[00:00:17] What you're gonna do is you're gonna through this role playing. You're gonna walk through those steps. We'll go back a slide and do without the strict mode. On this slide, you're gonna go through, and you are going to play. One of you will play the scope manager and other one of you will play the compiler, and then swap, and then also goes to the run time and do both roles, okay?

[00:00:39] And do it exactly like I just said. Hey, global scope, I have this LHS for foo, ever heard of it do that exact thing. Even though it sounds silly, we need to make sure that you fully get it. If you're watching this video at a later time, go find a co-worker and do the exercise with them, okay?

[00:00:54] But actually do this because this is how you get that ingrained, that instinct of how the lexical scope works, all right? We'll take a few minutes, let you practice that, and then we'll come back.