title: How to output the first, the middle, and the last letter of a word from a random string
body: <p>E.g. grape should output gae.
  If the beginning of the code looks like this, </p>
  
  <pre><code>var words = [ "banana", "apple", "pineapple", "orange", "pear", "grape",
    "watermelon",     "paragraph", "Avocado", "cherry", "blackberry", "coconut",
    "lime", "lemon", "olive", "plum",  "Nectarine", "mango", "apricot"];
  for (var i = 0; i &lt; 5; i++){ 
    var n1 = Math.floor(rc4Rand.getRandomNumber() * words.length); 
    var word = words[n1]; 
    document.writeln("The word is: " + word); 
    document.writeln("1st, middle and last letters are:"); 
    output(word); 
  } 
  </code></pre>
  
  <p>Should I write sth like array <code>n1[0]</code>, array <code>[n1.length-1]</code>, <code>array[length/2]</code> or what to get the result? Tks for all of your comments and advices!</p>