As some of you know, I authored a Pluralsight course on JavaScript for C# Developers. We’ve released an excerpt from that course covering how JavaScript function scopes work.
If you’re just getting started learning JavaScript, it can be easy to bring your C# biases to the language since they both have curly braces. Hopefully this excerpt will help:
Of course you could view the whole course if you have a Pluralsight subscription: