Hi,

Is tere any difference between these two codes or is it just a matter of taste?

Thanks

var days = new Array('Sunday','Monday');

var days = Array('Sunday','Monday');

Recommended Answers

Is that javascript? If so, then I don't think there is much of a difference. I personally use var blah = []; to define an array.

Jump to Post

All 2 Replies

Is that javascript? If so, then I don't think there is much of a difference. I personally use var blah = []; to define an array.

I think I got it wrong. PHP doesn't use first style. My mistake.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.