You need a space between new
and Array()
:
var Character = new Array();
The same applies to all the other lines making use of newArray()
.
Your code will run without errors after replacing all the occurrences of newArray()
with new Array()
, however as CMS previously suggested, you should consider using the array literal syntax instead:
var Character = ["Larry Lightfoot", "Sam Wrightfield", "Gavin Hartfild",
"Gail Quickfoot", "Robert Gragorian", "Peter Shain"];
Which as you can see, is much more readable than:
var Character=new Array();
Character[0]="Larry Lightfoot";
Character[1]="Sam Wrightfield";
Character[2]="Gavin Hartfild";
Character[3]="Gail Quickfoot";
Character[4]="Robert Gragorian";
Character[5]="Peter Shain";
Daniel Vassallo
2010-04-12 18:47:17