Javascript

Home Load Console Selectors CSS Form Strings If Else Array Reg Exp Date & Time setTimeout JSON Loops Objects Animation Fat Arrow Class Import IIFE undefined Tabulator.js ES6 Event Listeners AJAX Hide Elements Create Elements Checkbox ejs
O O

Weather Controls

Time Of Day
Rain
Wind Speed
Wind Direction
Clouds

Javascript : IIFE

2022-07-18

Immediately-Invoked Function Expression (IIFE) -creates a function then immediately runs it. -does not pollute the global namespace

These are identical:

(function () {
  // code
})();

var temp = function() {
  // code
}
temp();