re: What is IIFE in JavaScript? VIEW POST


Most people might not know this but if you are accustomed to not using semicolons you will run into cryptic runtime errors when using an IIFE. The solution is to always put a semicolon before an IIFE ;(() => {})()


I think semicolon is voluntary or best practice reason is if statement was not completed from previous code or semicolon do the job so we worry about our function only.

code of conduct - report abuse