title: Click a button to play sound on Javascript
body: <p>I would like to make a button play a B-flat scale when clicked. What am I doing wrong?</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script&gt;
  function PlaySound() {
      alert("hello");
    var bflat = new audio();
    bflat.src = "bflat.mp3";
    document.getElementById(bflat);
    bflat.Play();
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;audio id="bflat"&gt; &lt;/audio&gt;
  &lt;button onclick="PlaySound"&gt; B Flat &lt;/button&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>