0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Promiseについて【Javascript】【備忘録】

Posted at

概要

今まで逃げてたけど、Promiseについて備忘録。

基本形

function test(){
  return new Promise((resolve, reject)=>{
   // 正常処理時には
   // resolve(hoge)
   // のように記述すると、hogeの内容が関数の呼び出し元に返却される。
   // rejectも同様。こちらは異常処理時。
  })
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?