0

I often define an array like this:

var arr = new Array();

But when my PM saw my code, my PM said that I should define an array like this:

var arr = [];

and it will be more efficient. I find that there is another defined way var arr = ();?

What is the difference between them and which way do you often use?

Qantas 94 Heavy
  • 15,750
  • 31
  • 68
  • 83
flower
  • 2,212
  • 3
  • 29
  • 44

0 Answers0