Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 240 Bytes

iifes.md

File metadata and controls

16 lines (13 loc) · 240 Bytes

Immediately Invokable Function Expression

//IIFE
(function(){
  console.log('in func')
})() //'in func'

let app = function(){
  let car = 123
  console.log('in func')
  return {}
}

console.log(app) // [Function: app]