In what version of javascript was bracket notation introduced for arrays?

73 views Asked by At

In what version of javascript was bracket notation introduced for arrays?

For example, I could declare an array like this ...

var something = new Array("one","two","three");

but this looks much neater ...

var something= ["one","two","three"];

But has the second style of notation always been in javascript? Or was it added in a particular version? ie, version 1.0, 1.1, 1.2, etc

1

There are 1 answers

5
sagie On BEST ANSWER

yes. always there. in fact its recommended not to use the new Array and use [] instead.