JavaScript Under The Hood Pt. 7: IIFEs

JavaScript Under The Hood Pt. 7: IIFEs

JavaScript Under The Hood Pt. 7: IIFEs - Understand Immediately Invoked Function Expressions (IIFEs), what they’re used for, and be able to explain them to others. Before we get into the weeds of what IIFEs are and what they’re used for.

Welcome back to the Bite-Sized Advanced Javascript series, where we discuss advanced JavaScript concepts in an easy-to-understand and concise fashion.

The first time you heard the statement Immediately Invoked Function Expression (IIFE), you might have been a little intimidated. But, like many JavaScript concepts, it’s fairly straightforward and not as scary as it sounds.

Before we get into the weeds of what IIFEs are and what they’re used for, it’s important to go over a little vocabulary.

Understanding the concept of function statements vs. function expressions is critical to fully understand and appreciate the concept of IIFEs.

Let’s jump right in.

Function Statements

Put simply, a function statement will start with the word function when it's defined. Example:

//Function statement

function greet(name) {
   console.log(‘Hello ‘ + name)
//Hello Colton

javascript programming coding software-development software-engineering

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Software Developer vs Software Engineer — Differences: Bogus or Real?

In this article, see if there are any differences between software developers and software engineers. What you’re about to read mostly revolves around my personal thoughts, deductions, and offbeat imagination. If you have different sentiments, add them in the comment section, and let’s dispute! So, today’s topic…

Offshore Software Development - Best Practices

To make the most out of the benefits of offshore software development, you should understand the crucial factors that affect offshore development.

Hire Dedicated JavaScript Developers -Hire JavaScript Developers

Hire dedicated JavaScript Developers who are proficient in AngularJS, ReactJS, NodeJS, & VueJS frameworks. Get flexible hiring models as per your business requirements.

Developer or Engineer? Does It Make a Difference?

To summarise the main differences between the software developer and engineer: A developer executes. ... So the software developer is mainly focused on developing code that is a part of software development cycle. An engineer designs and plans applying the principles of engineering to software development.

Interested in Learning to Program? 13 Reasons to Start Now

Software development is something that is gaining popularity at lightning speed with the development of technology. The demand for regular developers is high compared to most other mainstream professions. But, what are the other reasons for learning to code?