button.addEventListener(‘click’, () => {
if (button.textContent === ‘Like’){
button.textContent = ‘Liked!’;
}else {
button.textContent = ‘Like’
}
});
}
qual o problema?
button.addEventListener(‘click’, () => {
if ( button.textContent === ‘Like’) {
button.textContent =‘Liked!’;
} else {
button.textContent = ‘Like’;
}
});
}
usa assim