loading...

Discussion on: JavaScript: I have a problem to set the conditions of the beginnings of the loops.

dploeger profile image
Dennis Ploeger

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.