const buttons = document.querySelectorAll('button');
buttons[0].addEventListener('click', () => {
number = prompt('pick any number');
if (number < 11) {
alert('You’ve won a civit');
} else if ((number >= 11) && (number < 21))
{
alert('You’ve won a civit');
} else
{
alert('you get nothing');
}
});
Logic Practice
Page section: playground
More on conditionals