El problema es que cuando presiono el botón "depositar", la función "depositar dinero" debería ejecutarse y agregar la cantidad deseada al saldo actual. Sin embargo, no hace eso y el saldo permanece en $0.
// Variable declarations let balance = document.getElementById("balance"); let balanceAmount = 0; let depositInput = 0; depositInput = document.getElementById("depositAmount").value; let depositButton = document.getElementById("depositButton"); // Cash amount let cash = document.getElementByIJd("cash") let cashAmount = 1000; // Draw on screen balance.innerHTML = "$" + balanceAmount; cash.innerHTML = "$" + cashAmount; // This function runs through onclick in the html document function depositMoney() { balanceAmount = balanceAmount + depositInput; balance.innerHTML = "$" + balanceAmount; } <div class="atm-deposit"> <input type="text" name="Deposit Amount" id="depositAmount"> <input type="button" value="Deposit" id="depositButton" onclick="depositMoney()"> </div>