title: Moving first item in array to the last position
body: <p>I'm trying to move the position of the first item of an array at the press of a button,
  I tried using <code>array.push(array.shift());</code> but it doesn't work</p>
  <p><a href="https://codesandbox.io/s/react-playground-forked-zo3rn?file=/DailyScheduler.js" rel="nofollow noreferrer">codesandbox</a></p>
  <pre class="lang-js prettyprint-override"><code>import React from &quot;react&quot;;
  
  const DailySchedule = () =&gt; {
    let exerciseList = [&quot;exercise 1&quot;, &quot;exercise 2&quot;, &quot;exercise 3&quot;];
  
    return (
      &lt;div&gt;
        &lt;section&gt;
          &lt;h2&gt;Warm-up&lt;/h2&gt;
  
          &lt;ul&gt;
            {exerciseList.map((exrcs, idx) =&gt; {
              return (
                &lt;li&gt;
                  {exrcs}{&quot; &quot;}
                  {idx === 0 &amp;&amp; (
                    &lt;button
                      onClick={() =&gt;
                        console.log(exerciseList.push(exerciseList.shift()))
                      }
                    &gt;
                      Done
                    &lt;/button&gt;
                  )}
                &lt;/li&gt;
              );
            })}
          &lt;/ul&gt;
        &lt;/section&gt;
      &lt;/div&gt;
    );
  };
  </code></pre>