title: Javascript: I am trying to loop through a string of characters and determine if a character is missing
body: <p>this is my challenge: Create a function that will find the missing letter passed in the parameter and return it. If all letters are present in the string, the return will be undefined. For example missingLetter("abce") should return "d", missingLetter("bcd") should return undefined.</p>
  
  <p>I am having trouble with this one, can you please tell me if I am on the right track with my code:</p>
  
  <pre><code>var missingLetter = function(char){
    var missing = "";
    var str = "abcdefghijklmnopqrstuvwxyz";
    for (var i = char[0]; i &lt; char.length; i++){
       for(var y = char[0].indexOf(str); y &lt; char.length; y++ ){
         if(char[y].indexOf(str) == -1 ){
           missing.push(char[y]);
         }
       }
    }
     console.log(missing);
    return missing;
  }
  missingLetter("abce")
  </code></pre>