title: strange behavior in shuffle React
body: <p>in my React app, I call shuffle 2 times for 2 different card sets but shuffle always gives 2 card sets the exact same result, can someone help me fix it?</p>
  
  <pre><code>class PairThemUp extends React.Component{
      constructor(props){
          super(props);
          this.state={
              cards1:[],
              cards2:[],
          }
      }
  
      shuffleCards=()=&gt;{
          const cards=this.props.selectedCards
          const cards1=shuffle(cards)
          const cards2=shuffle(cards)
          this.setState({cards1, cards2})
  
          const id1=cards1.map(c=&gt;c.id)
          const id2=cards2.map(c=&gt;c.id)
          console.log(id1, id2)
      }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/UpeUF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UpeUF.png" alt="enter image description here"></a></p>
  
  <p>shuffle gives 2 card sets the same result until I run shuffleCards function again. this is my shuffle function</p>
  
  <pre><code>export const shuffle=(a)=&gt; {
      for (let i = a.length - 1; i &gt; 0; i--) {
          const j = Math.floor(Math.random() * (i + 1));
          [a[i], a[j]] = [a[j], a[i]];
      }
      return a;
  }
  </code></pre>