title: Need simplified function for onclick button sounds
body: <p>This is my first question here sorry if I make any mistake.</p>
  <p>I want to know how to simplify an action (function), I have a drumkit with different buttons and sounds, I'm using this code: <a href="https://jsfiddle.net/pL23q6g1/3/" rel="nofollow noreferrer">FIDDLE</a></p>
  <p>JS</p>
  <pre><code>function play() {
      var audio = document.getElementById('audio1');
  
      if (audio.paused) {
          audio.play();
      } else {
          audio.currentTime = 0
      }
  } 
  </code></pre>
  <p>How can I write just one function and play different sounds for every button?</p>