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,410
  • 31
  • 63
  • 82
flower
  • 2,091
  • 3
  • 24
  • 40

0 Answers0