Skip to content

Promise相关整理 #196

Description

@ckinmind

参考资料

知识点

  • Promise实例具有then方法,then方法是定义在原型对象上的。它的作用是为Promise实例添加状态改变时的回调函数
  • then方法的第一个参数是resolved状态的回调函数,第二个参数是rejected状态的回调函数
  • then方法返回的是一个新的Promise实例

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions