var btnSoma = document.querySelector("#btnSoma")
var btnSubtrai = document.querySelector("#btnSubtrai")
var currentNumberWrapper = document.getElementById('currentNumber');
var currentNumber = 0;
btnSoma.addEventListener("click", function incremento() {
currentNumber++
currentNumberWrapper.innerHTML = currentNumber;
return
})
btnSubtrai.addEventListener("click", function decrement(){
currentNumber--
currentNumberWrapper.innerHTML = currentNumber;
return
})
console.log(currentNumber)
if (currentNumber < 0){
document.getElementById('currentNumber').style.color="#ca6567";
}
Não estou sabendo como alterar a variável "CurrentNumber"