function winResult(result) {

  let bet = document.querySelector('input').value
  console.log(bet)
  console.log(amount)

  if (result === 'win') {

    amount = parseInt(amount) + parseInt(bet)
    document.getElementById('betMoney').innerHTML = amount
    playerWins++
    document.getElementById("playerWins").innerHTML = playerWins;
    displayCompleteMessage("You won");
    update()

  } else {
    amount = parseInt(amount) - parseInt(bet)
    document.getElementById('betMoney').innerHTML = amount
    playerLoses++
    document.getElementById("playerLoses").innerHTML = playerLoses;
    displayCompleteMessage("You Lost");
    update()
  }
}
// this function keeps tracks of when the player loses

this function keeps tracks of when the player loses
this function keeps tracks of when the player loses
function winResult(result) {
  let bet = document.querySelector('input').value
  console.log(bet)
  console.log(amount)
  if (result === 'win') {
    amount = parseInt(amount) + parseInt(bet)
    document.getElementById('betMoney').innerHTML = amount
    playerWins++
    document.getElementById("playerWins").innerHTML = playerWins;
    displayCompleteMessage("You won");
    update()
  } else {
    amount = parseInt(amount) - parseInt(bet)
    document.getElementById('betMoney').innerHTML = amount
    playerLoses++
    document.getElementById("playerLoses").innerHTML = playerLoses;
    displayCompleteMessage("You Lost");
    update()
  }
}
function winResult ( result ) { let bet = document . querySelector ( 'input' ) . value console . log ( bet ) console . log ( amount ) if ( result === 'win' ) { amount = parseInt ( amount ) + parseInt ( bet ) document . getElementById ( 'betMoney' ) . innerHTML = amount playerWins ++ document . getElementById ( "playerWins" ) . innerHTML = playerWins ; displayCompleteMessage ( "You won" ) ; update ( ) } else { amount = parseInt ( amount ) - parseInt ( bet ) document . getElementById ( 'betMoney' ) . innerHTML = amount playerLoses ++ document . getElementById ( "playerLoses" ) . innerHTML = playerLoses ; displayCompleteMessage ( "You Lost" ) ; update ( ) } }
this function keeps tracks of when the player loses
this function keeps tracks of when the player loses