Difference between Array(n) and Array(n).fill?

前端 未结 0 1328
感动是毒
感动是毒 2021-02-13 00:31

I\'ve noticed that if I do:

Array(n).map(() => console.log(\'test\'))

I get nothing printed.

However if I do:

Array(         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题