How do you use an array returned from a function in another function?
<p>Say I have this:</p>

<pre><code>class Card {
  constructor(rank, suit){
    this.rank = rank;
    this.suit = suit;
  }

  buildDeck(){
     //builds my deck
    return deck;
  }

  shuffleDeck(){
    //use buildDeck.deck inside here???
  }

}
</code></pre>

<p>How would I use the deck built inside <code>buildDeck()</code> inside <code>shuffleDeck()</code>?</p>

<p>I don't want to set globals because they are messy and not good practice</p>