# ES6 IIFE with fat arrow functions

DevFeed: [ES6 IIFE with fat arrow functions](<https://devfeed.tech/articles/es6-iife-with-fat-arrow-functions-32301.md>)

Original publisher: [Read original article](<https://jack.ofspades.com/es6-iife-with-fat-arrow-functions/>)

Author: Jack Tarantino

Published: 2015-11-29T17:45:39Z

Content type: tutorial

Language: en

Sources: [Jacopo Tarantino](<https://devfeed.tech/sources/jacopo-tarantino.md>)

Topics: [es6](<https://devfeed.tech/topics/es6.md>), [es2015](<https://devfeed.tech/topics/es2015.md>), [function](<https://devfeed.tech/topics/function.md>), [syntax](<https://devfeed.tech/topics/syntax.md>)

Tags: [best-practices](<https://devfeed.tech/tags/best-practices.md>), [closure](<https://devfeed.tech/tags/closure.md>), [context](<https://devfeed.tech/tags/context.md>), [es2015](<https://devfeed.tech/tags/es2015.md>), [es6](<https://devfeed.tech/tags/es6.md>), [function](<https://devfeed.tech/tags/function.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [syntax](<https://devfeed.tech/tags/syntax.md>)

## AI overview

This tutorial explains how to write Immediately Invoked Function Expressions (IIFEs) in ES6 using fat arrow functions. It compares shorter syntax options, notes differences in function context, and describes a compact form for creating closures that cannot accept arguments.

## Source excerpt

Writing Immediately Invoked Function Expressions or IIFEs in ES6(Also known as ES2015 now) just got a lot easier with the introduction of fat arrow functions. (global => { const MY_CONSTANT = 'api key or something' let counter = 0 let some_array = [1,2,34,5,6,7] counter = some_array.