• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

await Promise.all 질문

19.12.20 02:01 작성 조회수 96

0

if (hashtags) {
      await Promise.all(
        hashtags.map(tag =>
          db.Hashtag.findOrCreate({
            where: { name: tag.slice(1).toLowerCase() }
          })
        )
      );
   }

promise에서 개선된게 async/await로 알고 있는데 await랑 promise를 모두 쓴 이유가 궁금합니다.

답변 1

답변을 작성해보세요.

1

Promise.all은 async/await으로 표현하기가 힘듭니다.