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");
})
Dave
  • 1
  • 1
  • 9
  • 38

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
  • 331
  • 3
  • 18