We're a place where coders share, stay up-to-date and grow their careers.
Perhaps you could just make it broader so it accepts the values 0 and 1.
Yes, I understood it. I would like to know how to do it.
Well, like this for instance:
let currentNumber = document.getElementById('Number').textContent; if (currentNumber !== '0' && currentNumber !== '1') return;
It's not optimal, just for demonstration purposes.
Perhaps you could just make it broader so it accepts the values 0 and 1.
Yes, I understood it. I would like to know how to do it.
Well, like this for instance:
It's not optimal, just for demonstration purposes.