It looks like its monsters
thats undefined, not createMonster. Make sure to initialize the monsters
array and you should be ok.
You can change line 7 to
var monsters = [];
you're also missing a new
statement when setting the monster,
you need
monsters[i] = new createMonster("monster",monsterPositions[i],1);