4 key JavaScript Concepts for Web Development

IIFE, Scope, Closures, and Hoisting

Table of contents

JavaScript is a type of computer language that helps make web pages come to life! It's one of the most popular languages and is used on almost all websites.

As a web developer, there are four important concepts to understand.

  1. IIFE

    Also called an Immediately Invoked Function Expression is like a secret code that is run right away and can't be accessed from outside. This helps keep everything in its own private space and not make a mess in the bigger space where it lives.

  2. Scope

    The scope is like a box that keeps things separate. It's important to understand what's inside and outside of the box to make sure everything works correctly.

  3. Closures

    They are like a secret code within a secret code. It's a way to share information between the two without making a mess in the bigger space.

  4. Hoisting

    Don't confuse this hosting, it's "HOIST" ing, so the hosting is used when JavaScript moves things to the top of the code before running it. This can sometimes cause confusion, so it's important to understand how it works.