So, what we have here is an array full of words, right? All it is just a random list I wrote for a bingo board which I'm making. Simple. Beneath it is a while loop which is supposed to list all of the arrays. Now, this is located in the head tags of my index file. If you scroll down, I'll show you what else I have...
var words = new Array(
words[1] = "Religion";
words[2] = "Nietzche";
words[3] = "Inventor";
words[4] = "Visionary";
words[5] = "Philosophy";
words[6] = "Tesla";
words[7] = "AC>DC";
words[8] = "Sociology";
words[9] = "Parasite";
words[10] = "Parasite";
words[11] = "Hard";
words[12] = "Times";
words[13] = "HTML";
words[14] = "jQuery";
words[15] = "C++";
words[16] = "Develop";
words[17] = "Doctype";
words[18] = "Can";
words[19] = "You";
words[20] = "Find";
words[21] = "The";
words[22] = "Hidden";
words[23] = "Word?";
words[24] = "Verb";
words[25] = "Show";
words[26] = "There";
words[27] = "That";
words[28] = "Are";
words[29] = "Thou";
words[30] = "They";
words[31] = "Bloat";
words[32] = "ChimiChanga";
words[33] = "Gas";
words[34] = "Chess";
words[35] = "Strategy";
words[36] = "Psychology";
words[37] = "INTJ";
words[38] = "ENTJ";
words[39] = "INTP";
words[40] = "ENTP";
words[41] = "BLARGH";
words[42] = "So";
words[43] = "Many";
words[44] = "Different";
words[45] = "Words";
words[46] = "Just";
words[47] = "Cause";
words[48] = "Boss" ;
words[49] = "Bouss" ;
words[50] = "Interesting" ;
words[51] = "Make-Believe" ;
words[52] = "Hardship";
words[53] = "Challenge";
words[54] = "Laughing";
words[55] = "Creative";
words[56] = "Technology";
words[57] = "Humanity";
words[58] = "Genius";
words[59] = "Stoic";
words[60] = "Philosopher";
words[61] = "Ambitious";
words[62] = "Concentrated";
words[63] = "Conceptual";
words[64] = "Disciplined";
words[65] = "Half-Tracking";
words[66] = "Inventive";
words[67] = "Database";
words[68] = "Strange";
words[69] = "Success";
words[70] = "Psyche";
words[71] = "Understanding";
words[72] = "Aquarius";
words[73] = "Pisces";
words[74] = "Aries";
words[75] = "Taurus";
words[76] = "Gemini";
words[77] = "Cancer";
words[78] = "Leo";
words[79] = "Virgo";
words[80] = "Libra";
words[81] = "Scorpio";
words[82] = "Sagittarius";
words[83] = "Capricorn";
words[84] = "Personality";
words[85] = "Categorial";
words[86] = "Freak-show";
words[87] = "Nightmare";
words[88] = "Horror";
words[89] = "DieHard";
words[90] = "Ninety";
words[91] = "Tea";
words[92] = "Chopping";
words[93] = "Half-track";
words[94] = "Analytical";
words[95] = "Logic";
words[96] = "Odd";
words[97] = "Reason";
words[98] = "Business";
words[99] = "Innovation";
words[100] = "One-Hundred";
);
function postArray(){
for(a=0; a<words.length; a++){
document.write(words[a] + "</br>");
}
}
Beneath that, enclosed within a simple div tag, lies this:
<script type="text/javascript">
document.write(postArray());
</script>
Please, someone tell me, what am I doing wrong?
This post has been edited by macosxnerd101: 24 December 2010 - 03:16 PM
Reason for edit:: Title renamed.

New Topic/Question
Reply



MultiQuote





|