i am currently learning javascript and i want to make the “chips” dynamic by increasing the chips but what my code didnt work.
let player = {
name : "Player1",
chips : 0
}
function chips () {
if (isAlive = true) {
player.chips = 0
player.chips += 50
}
}
let playerEl = document.getElementById("player-el")
playerEl.textContent = `${player.name} : ${player.chips} €`
Here is what i tried, if someone can help me i would appreciate it, thanks .