This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | let dealerCardString = ''; | |
| for (let i=0; i<dealerCardString.length; i++) { | |
| dealerCardString += getCardString(dealerCards[i]) + '\n'; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function shuffleDeck(deck) { | |
| for (i = 0; i < deck.length; i++) { | |
| let swapIdx = Math.trunc(Math.random() * deck.length); | |
| let tmp = deck[swapIdx]; | |
| deck[swapIdx] = deck[i]; | |
| deck[i] = tmp; | |
| } | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Game Variables | |
| let gameStarted = false, | |
| gameOver = false, | |
| playerWon = false, | |
| dealerCards = [], | |
| playerCards = [], | |
| dealerScore = 0, | |
| playerScore = 0, | |
| deck = []; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // | |
| // blackjack | |
| // by Brendan McCabe | |
| // | |
| let suits = ['hearts', 'clubs', 'diamonds', 'spades']; | |
| let values = ['Ace', 'King', 'Queen', 'Jack', 'Ten', 'Nine', 'Eight', 'Seven', 'Six', 'Five', 'Four', 'Three', 'Two']; | |
| function createDeck() { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function changeCard(card) { | |
| card.suit = "Clubs"; | |
| } | |
| let card = { | |
| suit: "Hearts", | |
| value: "Queen" | |
| }; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var myMusic = [ | |
| { | |
| "artist": "Billy Joel", | |
| "title": "Piano Man", | |
| "release_year": 1973, | |
| "formats": [ | |
| "CS", | |
| "8T", | |
| "LP" ], | |
| "gold": true |