---
title: "Adarsh Hegde (@adarshhegde) | Hashnode"
description: "1+1=10. Read the latest articles by Adarsh Hegde on Hashnode."
url: "https://hashnode.com/@adarshhegde"
---

@adarshhegde

# Adarsh Hegde

@adarshhegde · Joined September 2020

1+1=10

## Comments

[this is pretty common tho, especially when doing everything in vanilla JS rather than using frameworks](https://hashnode.com/posts/useful-javascript-patterns-revealing-module-pattern/6055a7c863a05a21443f1a63/comment/605747635f8d512169727bcf#reply-605b9ce678c4742436d50081)

Reply · Article · Mar 24, 2021 · [Useful Javascript patterns: Revealing Module Pattern](https://hashnode.com/posts/useful-javascript-patterns-revealing-module-pattern/6055a7c863a05a21443f1a63)

[its to prevent the IIFE opening and closing parenthesis to act as a function call for the previous statement which will throw an error let statement\_1 = () => console.log("whatever"); statement\_1() (() => { console.log("haha") })() this will throw an error, statement\_1(...) is not a function but you might say it is a function, so why the error? statement\_1() // this statement executes that anonymous function, and returns nothing, and the opening and closing ( parenthesis ) of the IIFE will make it look like its a function call for the return value of the above statement so it will actually look like statement\_1()( ()=>{ .. } )() // the outer IIFE parenthesis is now acting as function call syntax for return value of statement\_1() so it'll try to call the returned value from statement\_1() as a function, so it will cause all loads of bugs and errors, to fix this we manually state the end of the first statement with a semicolon, this way the JavaScript engine doesn't get confused and can differentiate between the two statements properly statement\_1(); ( () => {}) () TL;DR use semicolons more often. in the post they just placed the semicolon at the beginning of the IIFE rather than end of first statement.](https://hashnode.com/posts/upcoming-interesting-javascript-es2021-es12-features-to-look-for-1/6055db305f8d512169726a2d/comment/605a266c47b0d2243d4aaef2#reply-605b9c3b78c4742436d5007c)

Reply · Article · Mar 24, 2021 · [Upcoming Interesting JavaScript ES2021 (ES12) Features to Look for](https://hashnode.com/posts/upcoming-interesting-javascript-es2021-es12-features-to-look-for-1/6055db305f8d512169726a2d)

[You'll get used to it and maybe actually like it haha.](https://hashnode.com/posts/facts-about-react-jxs/5f72265740fb187c4fe5a1f5/comment/5f7304831d7a870a345b9964#reply-5f739f501d7a870a345ba4a7)

Reply · Article · Sep 29, 2020 · [Facts about React JXS](https://hashnode.com/posts/facts-about-react-jxs/5f72265740fb187c4fe5a1f5)

[These are elementary. 🤷‍♂️](https://hashnode.com/posts/quick-review-of-5-of-the-most-powerful-javascript-methods/5f6dd20d60599c596c4720e2/comment/5f6ee13860599c596c472b27)

Comment · Article · Sep 26, 2020 · [Quick Review of 5 Of The Most Powerful JavaScript Methods](https://hashnode.com/posts/quick-review-of-5-of-the-most-powerful-javascript-methods/5f6dd20d60599c596c4720e2)
