title: Timing in JS - multiple setIntervals running at once and starting at the same time?
body: <p>Let's say I have a function:</p>
  
  <pre><code>myFunc = function(number) {
    console.log("Booyah! "+number);
  }
  </code></pre>
  
  <p>And I want it to run on a set interval. Sounds like I should use <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window.setInterval" rel="noreferrer">setInterval</a>, huh!</p>
  
  <p>But what if I want to run multiple intervals of the same function, all starting at the exact same time?</p>
  
  <pre><code>setInterval(function(){
    myFunc(1);
  }, 500);
  
  setInterval(function(){
    myFunc(2);
  }, 1000);
  
  setInterval(function(){
    myFunc(3);
  }, 2000);
  </code></pre>
  
  <p>So that the first runs exactly twice in the time it takes the second to run once, and the same between the second and third. </p>
  
  <p>How do you make sure that they all start at the same time so that they are in sync?</p>