Skip to content Skip to sidebar Skip to footer

How To Using Es6 Arrow Function To Realize Immediately-invoked Function Expression (iife))?

How to using ES6 Arrow function to realize IIFEImmediately-Invoked Function Expression? Here is my demo codes, and it had tested passed! However, there still has something is wron

Solution 1:

Surround it with parentheses:

(() => console.log('hello'))()

Post a Comment for "How To Using Es6 Arrow Function To Realize Immediately-invoked Function Expression (iife))?"