javascript foreach async or sync