This course has been updated! We now recommend you take the JavaScript: From First Steps to Professional course.

Check out a free preview of the full JavaScript: From Fundamentals to Functional JS, v2 course:
The "Scope Takeaways" Lesson is part of the full, JavaScript: From Fundamentals to Functional JS, v2 course featured in this preview video. Here's what you'd learn in this lesson:

Bianca reviews with students the big takeaways from the scope walkthroughs.

Get Unlimited Access Now

Transcript from the "Scope Takeaways" Lesson

>> Bianca Gandolfo: What were your big takeaways from that scope exercise? Where did we leave off in our little trailing game? Who did the big reveal on the last one, 13?
>> Bianca Gandolfo: No one remembers? That was a big responsibility.
>> Speaker 2: Like five whole minutes ago.
>> Bianca Gandolfo: Yeah, it was five minutes ago, you're right, that's way too long to remember.

>> Speaker 3: The ability that let can be blocking scope, I didn't know that.
>> Bianca Gandolfo: Yeah, that, and you can use let and create block scope, yeah.
>> Speaker 4: You are setting the values as soon as you call the function again.
>> Bianca Gandolfo: Yeah, so creating an execution context every time we call a function.

[00:00:46] A new execution context is created, which means any variables that are initialized, just like in a loop, right? When you loop, you leave a variable inside of a loop, it's going to get re-initialized. If you're initializing your variable in a loop, similar idea.
>> Bianca Gandolfo: So.
>> Bianca Gandolfo: Let's talk about why we're really here, we're trying to figure out who killed Mr. Body, anything on Miss Scarlett so far?

[00:01:23] So we've been going through, for almost two days now, a lot of data. Anyone have any hunches about Miss Scarlett's relationship with the murder of Mr. Body?
>> Bianca Gandolfo: Thumbs up if you think she is not guilty. Thumbs down if you think she is a cold blooded killer.
>> Bianca Gandolfo: Okay, some people don't have opinions, there is no-

>> Speaker 2: Well, she's a viable suspect right now, right?
>> Bianca Gandolfo: Yeah.
>> Speaker 2: Yeah.
>> Speaker 4: I think we've been awfully focused on Miss Scarlet, I mean, we're kind of picking people here.
>> Speaker 2: It's a red herring.
>> Speaker 3: Yeah, a scarlet one.
>> Bianca Gandolfo: [LAUGH]
>> Speaker 4: [LAUGH]