Skip to content

then() 用法辨析的一些疑惑 #252

@richard1230

Description

@richard1230

阮老师,就then() 用法辨析这一块能不能给出一些代码实例,感觉这样会更好理解一些;

// 写法一
f1().then(function () {
  return f2();
});

// 写法二
f1().then(function () {
  f2();
});

// 写法三
f1().then(f2());

// 写法四
f1().then(f2);

就是说这上面的四个例子可不可以用具体的例子来阐述,总感觉原文叙述的不够深刻,对于初学者而言还是有些困难,通过具体的代码实例会更好理解一些

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions