title: Console log not printing variable from function
body: <p>Trying to print the variable 'randomWord' to console.log, but chrome says it is not defined.
  It looks like it's defined to me. Why won't it print to the console.log?</p>
  
  <pre><code>function strt(){
  
  //get random word from words[] array
  var randomWord = words[Math.floor(Math.random()* words.length)];
  
  var wordLength = randomWord.length;
  
  
  //create a blank boxes or div elements for holding each letter of 
  // selected random word
  for(i = 0 ; i&lt; wordLength; i++){
  
  var divTag = document.createElement("div");
  divTag.id = "div" + i;
  divTag.className = 'wordy';
  //divTag.innerHTML = randomWord[i];
  hangManDiv.appendChild(divTag);
  
  };// end for loop
  
  //disable start button
  document.getElementsByName("startB")[0].disabled = true;
  
  return randomWord;
  
  }//end strt()
  
  console.log(randomWord);
  </code></pre>