outline:
Promise 物件實例中,
1 Promise 物件實例中,例子裡沒有設計 reject - catch 的段落,因此參數寫 _reject。
在習慣上,加底線表示後面沒有用到這個參數。
new Promise((resolve, _reject) => { for (const [user_index, user] of users.entries()) { // 創建使用者資料(user): model.create UserModel.create({ ...user }).then((user) => { // 對每個user建立相對應餐廳資料 return RestaurantModel.create(restaurants) }).then(() => { resolve() }).catch(error => { console.log(error) }) } }).then(() => { // 等待所有使用者的餐廳資料創建完成 console.log('所有使用者與餐廳資料創建完成') process.exit() })

![[Day03]: 容器與映像技術原理](https://static.coderbridge.com/img/leozzmc/b3dc0067f83a4dc2b78eb43da6a5f92a.png)
