title: Random Text with Javascript
body: <p>I'm trying to output a random word into a specific html element. I'm almost there - but I think I'm messing up the part which prints the text... </p>
  
  <p>Can anyone give me a tip as to where I'm going wrong ?</p>
  
  <pre><code>var txtGreeting = 10;
  var randomCount = Math.round(Math.random() * (txtGreeting - 1)) + 1;
  var greeting = new Array();
  greeting[1] = "hello",
  greeting[2] = "ciao",
  greeting[3] = "welcome",
  greeting[4] = "howdy",
  greeting[5] = "greetings",
  greeting[6] = "salut",
  greeting[7] = "hallo",
  greeting[8] = "hola",
  greeting[9] = "Gday",
  greeting[10] = "Hey",
  
  document.getElementById("title").html = "greeting[randomCount]";
  </code></pre>