DEV Community

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

 
andybullet profile image
AndyBullet

Yes, I understood it. I would like to know how to do it.

Thread Thread
 
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.