I have two button Pulse and Minus. when the plus get clicked I want the points to increment and when the minus get clicked I want the points to decrement. For some reason when I click both button the points get decremented. Can someone please help me with this problem?
const incAndDecPoints = function () {
const playerOnePoints = document.querySelector(".points-pl-one");
let value = playerOnePoints.innerHTML;
playerOnePluseBtn === "click" ? value++ : value--;
document.querySelector(".points-pl-one").innerHTML = value;
};
playerOnePluseBtn.addEventListener("click", incAndDecrePoints);
playerOneMinusBtn.addEventListener("click", incAndDecrePoints);