0

What does this do? Is this something like an empty function? Can't find any information on this, in what use case this is used?

(() => {
 console.log("test");
})
z0nk
  • 53
  • 5

1 Answers1

3

If it had another set of parenthesis at the end, it would be a self executing function

(() => {
 console.log("test");
})()

but as is, it does nothing.

iain
  • 223
  • 2
  • 15