Perhaps ironically, the discussion that your link references kind of deconstructs the idea that using new isn't recommended "in general". Douglas Crockford's opinions and best practices aren't taken seriously by everybody. Brendan Eich, for example, can often be seen opposing Crockford's advice.Originally Posted by kirupa in the tutorial
In my opinion,  vs. new Array is a non-issue, in the sense that I'd never feel the need to convert somebody else's use of one form to the other, and I've never seen anybody accidentally use new Array(5) to mean . I've also never seen a situation where someone overrode Array. If it were to happen accidentally, you would not feasibly be able to continue working on your site/app without immediately noticing that related uses of Array were causing errors.
I'm not happy with your decision to recommend against that use case, although I think it's a trivial part of the tutorial.
I've found that 99% of "best practices" are 99% subjective.
We tolerate living and breathing. And niches.
Name Brand Watches
Maybe getTimer() or TweenMax is the answer to your problem . . .
What about the slice and splice functions? Especially the splice function might be of good use when using arrays.
AS2 / AS3 / JS / JQUERY / (X)HTML / HTML5 / CSS / CSS3 / PHP
There are currently 1 users browsing this thread. (0 members and 1 guests)