Page 1 of 1

SFS PRO 1.2.5 - new array shortcut

Posted: 06 Dec 2005, 11:31
by Virusescu
While developing an extension I ran into the following problem.
I was defining an array using the shortcut method like

Code: Select all

var myArr = [1,5,23,6];
//as I later discovered.
trace(myArr[1]);//traces undefined
trace(myArr);// traces NaN
While defining the array like
var myArr = new Array(1,5,23,6); works perfect.

Posted: 07 Dec 2005, 11:45
by Lapo
humm... not sure what the problem could be
the literal assignment should work, and I've already used it.

I will investigate :)