for (x=1;x<cbv.length;x++;y=0;z=0)
{if (y==70)
{
document.write(cbv[x] + vow[y] + cav[z] + "<br />");
(x=1;y=0;z++);
}
else if (x==48)
{
document.write(cbv[x] + vow[y] + cav[z] + "<br />");
(x=1;y++);
}
else
{
document.write(cbv[x] + vow[y] + cav[z] + "<br />");
(x++);
}
}
I know these probably contradict each other and I know this won't work. Basically what I'm trying to do is create words using a list of consonant sounds that can come before a vowel sound (cbv), vowel sounds (vow), and consonant sounds that can come after a vowel sound (cav). I have already made lists of all possibilities for each and I put each of those lists in three seperate arrays. (Those arrays are written above the code you see here in the master code I have saved on my computer.) I'm trying to make it so the program will write cbv[1] + vow[0] + cav[0] onto the document, then go back and write cbv[2] + vow[0] + cav[0] and continue that trend until it reaches cbv[70], then it is supposed to reset to cbv[1] and change vow[0] to vow[1] (so it would be cbv[1] + vow[1] + cav[0]) and repeat the process again. After getting to vow[48], it would change cav[0] to cav[1] and reset to cbv[1] and vow[0] (so it would be cbv[1] + vow[0] + cav[1]). The program would then end when it ran out of cav's. (Hopefully that wasn't too confusing.) So, I'm wondering if there's a way to achieve this effect in Javascript, or, if not, a way to achieve this effect in another language. Thanks in advance for the help!

New Topic/Question
Reply





MultiQuote






|