title: JavaScript: vowell or consonant function
body: <p>I am making a javascript function that tell the user whether the letter they entered is a vowel or consonant. I have tried to make a function but without success. Please someone show whats going on and how to fix it.</p>
  
  <p>Many Thanks</p>
  
  <p>James</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function letter() {
  
      var
      let = prompt("Your Letter");
  
      if (let == 'a' ||
        let == 'e' ||
        let == 'i' ||
        let == 'o' ||
        let == 'u') {
  
        alert("Your letter is a vowel");
  
      } else {
  
        alert("Your letter is a consonant");
      }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
  
    &lt;script&gt;
      function letter() {
  
          var
          let = prompt("Your Letter");
  
          if (let == 'a' ||
            let == 'e' ||
            let == 'i' ||
            let == 'o' ||
            let == 'u') {
  
            alert("Your letter is a vowel");
  
          } else {
  
            alert("Your letter is a consonant");
          }​
    &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;h3&gt;Vowel or Consonant&lt;/h3&gt; 
  &lt;input id="prompt" type="text" /&gt;
  &lt;p id="answer"&gt;&lt;/p&gt;
  &lt;button onclick="letter()"&gt;Check letter&lt;/button&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>