So what i basically want is when a button is clicked, it'll change the background-color to orange, and when i click on another button, i want the button that was clicked previously to change color to its original.
const subBtn = document.getElementById('submit');
const card = document.getElementById('card');
button.forEach(btn => {
btn.addEventListener('click', e => {
btn.style.backgroundColor = "#7C8798";
btn.style.color = 'white';
})
})
subBtn.addEventListener('click', e => {
subBtn.style.backgroundColor = 'white';
subBtn.style.color = '#FC7614'
});