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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.