Firstly;
randomletter is one long string not an array so you will need to use:
charAt(randomnumber) or indexOf(randomnumber)

Secondly;
Is this a homework assignment?

.....Willy

JohnKrutsch

03-19-2004, 05:15 AM

This will give you one random letter. If wanted to get more using this method you would have to loop it:

var randomletter='abcdefg...ABCDEFG...'.split("");
var randomalpha=randomletter[Math.floor(Math.random() * randomletter.length)];
I shortened your randomletter string for brevity but you should get the idea.