Closures
When a function runs, it goes through its code, then completes. Everything goes out of scope. There are times when we might want some information to “hang around”. Let’s start by looking at an example… Within our IIFE, we have a variable (animalName). We also have a nested function that returns the animalName variable. The […]