Exploring JavaScript - Scopes
What you'll learn
- Deep understanding of JavaScript's Scope System and the compilation phase of JS programs
- How JS Scope is organised using function declaration, function expressions and blocks.
- Why IIFE works the way it does, what hoisting really is and how can we effectively organise our code using the knowledge of scopes.
Requirements
- Be able to understand basic JavaScript program
Description
JavaScript is that language that you need to know in order to build applications that work across the platforms and knowing about the JS from the point of the language specification is really important.
In this course, we will cover the most neglected topic in JavaScript which is Scopes. The course is heavily inspired by Chapter 8 of the ECMAScript Specification. Although the spec talks about Execution context, Agents, Job, Executing Context Stack, et al, however in this course, we will stick closer to the lexical environment and its subparts.
Scopes system is one of the strongest pillars of JavaScript. Scopes not only touch the execution phase but it starts from the code authoring and extends its root in the compilation phase.
The course discusses every detail of how the scope is created and how does JavaScript engine deals with the code structure to come up with a blueprint which is then handed over to the Execution Engine. We will go in-depth in understanding how our program is processed by the compiler and what steps lead to the creation of scope.
We will cover the fundamentals of code patterns that help us create a better-organized code. We will look at how function-expression, function-declaration, blocks, modules, and scripts are part of the scope system. We will cover in-depth detail of how and why immediately invoked function expressions (IIFE) works. We will also look at hoisting and by the time we reach here, you would have already understood why hoisting is something, that it actually is not.
Finally, we will look at the essential ES6 feature i.e. let, const, and var, and understand why their behavior and what are the effects of using one over the other. What you will learn in this course will make you a stronger JavaScript developer, improve your abilities in writing solid JavaScript code and it will lead you to understand some of the advanced concepts of JavaScript like closures, higher-order functions, and module pattern.
Who this course is for:
- Beginner JS developers who would want to learn JavaScript
- Advanced/Intermediate JS developers who want to get deeper understanding of scope system and compilation phase of JS programs
- JS developers who want to start exploring the new ES6 features
- JS developers who want to understand how scopes works in JavaScript
Instructor
I have more than 10 years of experience, building web and mobile products using JavaScript and its frameworks. I have worked on applications that leveraged frameworks like ReactJS, React Native, AngularJS, Backbone, Ionic, etc.
Currently, I am using React in all my production codebases. I am weaving the applications together using Apollo Client, GraphQL, RamdaJS & TypeScript under a micro-frontend architecture. I strongly prefer using functional programming.
In my upcoming projects, I will be extending my FP skills and leverage ADTs using CrocksJS for handling the uncertainty of the data and type.
My technology journey started even before I joined college, in fact, I never studied computer science. I am a business graduate and self-taught technologist. I was lucky to be part of the Software Development & Research Group in the college that helped me grow on the tech side of things.
Soon after graduating, I created WebRupee and it was the first web-font API for Indian Rupee Symbol which was used by eBay, Jet, Kingfisher Airlines, Bata, BSNL, and thousands of top brands across the globe. WebRupee helped me segway into creating my own startup, building numerous products, and working with many clients that bootstrapped my venture. Later, I also created a Firefox toolkit that would bring in essential Photoshop features for a pixel-perfect web design and it was featured in SmashingMagazine(.com) and many top blogs around the world.
I have also collaborated with the Firefox team in reviewing browser plugins for their v4 release and delivered many workshops on how to build apps on the Firefox platform. The idea was to make create an open and inclusive culture for the developer community.