title: How to update an array everytime when pushing values
body: <p>I am facing difficulty while pushing the values inside the array.</p>
  <p>Suppose I have array like this</p>
  <p><code>const arr = [&quot;tom&quot;, &quot;harry&quot;, &quot;mike&quot;];</code></p>
  <p>What I want to achieve is, when I am pushing values inside this array. I don't want to append that value in the array, but create a new array with the appended value and not change the old array.</p>