```js
function whatever () {
  for (var i=0; i < arr.length; i++) {
     do something
    slowDown();
  };
};

 function slowDown () {
   time = setTimeout(function (){
       do something else
   }, 5000);
};

```