I am new to coding, and javascript sometimes has weird syntax. I know many methods for calling a function, but it intrigues me. I went through the code written by the developer, and I understood what was happening, but could not figure out how to do it.
A function is called, placed ("")next to the function definition inside ().
(function functionName() {console.log("Hello")}) ("")
(functionName)("")
I tried the search but could not find it here. I would be grateful if someone could explain what is happening here (concept). Let me know if this question is duplicated. Thank.
source
share