Pergunta de entrevista da empresa Wavicle Data Solutions

const add=()=>{ let x=1; return ()=>x+1; } add(); add(); console.log(add())

Respostas da entrevista

Sigiloso

22 de out. de 2019

According to the interviewer, the answer to this question is 4. The interviewer was an architect. I think you can now understand the standard of this company.

Sigiloso

30 de mar. de 2022

()=>x+1 A function will be returned as add function returns a function

Sigiloso

29 de mai. de 2026

[Function (anonymous)] will be the answer.