title: JavaScript - Search for first character in an Array
body: <p>I'm trying to find the first character in an Array in JavaScript.</p>
  
  <p>I have this a random function (not the best, but I am going to improve it):</p>
  
  <pre><code>function random() {
  var Rand = Math.floor(Math.random()*myArray.length);
  document.getElementById('tr').innerHTML = myArray[Rand];
  }
  </code></pre>
  
  <p>And here's my Array list.</p>
  
  <pre><code>myArray = ["where", "to", "get", "under", "over", "why"];
  </code></pre>
  
  <p>If the user only wants arrays with W's, only words with a W in the first letter is shown. (Like "where" or "why")</p>
  
  <p>I do not have a lot of experience with JavaScript from before and I have been sitting with this problem for ages.</p>