1

Usage of the var myArray = Array(10).fill(0); and var myArray = new Array(10).fill(0); seemingly return the same result.

Are there any differences between these two expressions? When should you use the new keyword and when should you not?

User 5842
  • 2,849
  • 7
  • 33
  • 51

0 Answers0