这个foreach里放sleep的话
UiCollection.forEach(
sleep(1000)
)
是可以达到依次顺序处理每个元素的效果的(下一个元素会等待上一个元素sleep完成)
forEach calls callbackfn once for each element present in the array, in ascending order. callbackfn is called only for elements of the array which actually exist; it is not called for missing elements of the array.
对于每个元素是按升序,调用里面的函数的
跟下标操作一个效果