title: How Can I Add A sleep or delay to this code?
body: <p>I use this to add friends on facebook. How can i slow this code down so that it will only run once per set time period? </p>
  
  <pre><code>var inputs = document.getElementsByClassName('_3-8_ img sp_zYKR9BP4QJasx_27b6db');
  for(var i=0; i&lt;inputs.length;i++) {
      sleep(2000);
      inputs[i].click();
  }
  </code></pre>