Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

169
Visualizações
what is this less/no documented IIFE in javascript

I know what this code will do:

( (...args)=>console.log(args) )( [1,2,3], [4,5,6,7,8] )

But I have bumped into another use, and I couldn't find what this means because I have no idea what to name it. I checked MDN's IIFE page, but it has no mention of this.

( 0, (...args)=>console.log(args) )( [1,2,3], [4,5,6,7,8] )

I tried to use different numbers and a function as that first argument but the result is not affected. Then I tried to put a variable in there and used it in the second fine (the function) but it polluted the global.


original code I saw is in @Jest/core's TestScheduler.js file.

(0, _testResult().addResult)(aggregatedResults, testResult);
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda