title: Creating an autocomplete function, not showing every word
body: <p>I am trying to create a mimic autocomplete, as the one jQuery provides is overloaded, and I don't want to use it that much.</p>
  
  <pre><code>var easyBB = {
    spellCheck: function(boolean,options) {
  if(boolean === true){
    $('textarea').on('keyup',function() {
      var wordTyped = $(this).val();
    for(var word in options.words){
      var i=0;
       while(wordTyped.indexOf(options.words[word])) {
       $('#responsiveWords').html(options.words[word]);
         i++;
        }
       }
      });
  
     }
    }
   };
  
     easyBB.spellCheck(true,{
         words:[
           "ActionScript",
           "AppleScript",
           "Asp",
           "BASIC",
           "C",
           "C++",
           "Clojure",
           "COBOL",
           "ColdFusion",
           "Erlang",
           "Fortran",
           "Groovy",
           "Haskell",
           "Java",
           "JavaScript",
           "Lisp",
           "Perl",
           "PHP",
           "Python",
           "Ruby",
           "Scala",
           "Scheme"
           ]                 
        });
  </code></pre>
  
  <p>Basically this is going to be for a textarea, the number one issue is how to get the word they are currently typing to work for this.</p>
  
  <p>Next issue is that is is only showing the first word in the words array. Not even resembling the word that it is closest to in character terms. Also it will only show one word, I want it to show any words that are indexOf the value...</p>
  
  <p>Can someone help me and explain to me what I am doing here. I am a self taught person so learning means to actually apply to the code so that is why I am writing a while loop. Just learned .call today :) Sorry irrelevant, anyways any suggestions in what I am doing wrong here?</p>
  
  <p><a href="http://jsbin.com/edolap/1/edit" rel="nofollow noreferrer">http://jsbin.com/edolap/1/edit</a></p>