I am trying to understand some confusing code I came across (original)
Here is a simplified version:
[1,2,3].map(v => alert(v), alert('first'))
Why is ‘first’ shows first ? and why is it evaluated only once ?
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
I am trying to understand some confusing code I came across (original)
Here is a simplified version:
[1,2,3].map(v => alert(v), alert('first'))
Why is ‘first’ shows first ? and why is it evaluated only once ?