title: Passing the table in functions after pressing the button
body: <p>Passing the table in functions after pressing the button. How can I get this effect with all the array options (.shift)
  I am getting the following message: app.js:13 Uncaught TypeError: arr.shift is not a function at HTMLButtonElement.b (app.js:13)</p>
  <pre><code>const btn = document.getElementById('id1');
  btn.addEventListener('click', b)
  function a() {
      const arr = [1, 2, 3 , 4];
      const btn = document.getElementById('id1');
      btn.addEventListener('click', b);
   }
   a()
  
   function b(arr) {
      arr.shift();
      console.log(arr);
    }
  </code></pre>