Angular Loop Through Array Javascript Mdn Settimeout