自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 接下来我们把 return 1 修改一下

Promise.resolve().then(() => {console.log(“then1”);Promise.resolve().then(() => {console.log(“then1-1”);return Promise.resolve();}).then(() => {console.log(“then1-2”);});}).then(() => {console.log(“then2”);}).then(() => {cons

2020-09-12 16:38:15 75

原创 以下大家可以猜猜 then1-2 会在何时打印出来?

Promise.resolve().then(() => {console.log(“then1”);Promise.resolve().then(() => {console.log(“then1-1”);return 1;}).then(() => {console.log(“then1-2”);});}).then(() => {console.log(“then2”);}).then(() => {console.log(“then3”)

2020-09-12 16:37:40 76

原创 每个链式调用的开端会首先依次进入微任务队列。

let p = Promise.resolve();p.then(() => {console.log(“then1”);Promise.resolve().then(() => {console.log(“then1-1”);});}).then(() => {console.log(“then1-2”);});p.then(() => {console.log(“then2”);});let p = Promise.resolve();p.then(()

2020-09-12 16:37:09 87

原创 同一个 then,不同的微任务执行

Promise.resolve().then(() => {console.log(“then1”);Promise.resolve().then(() => {console.log(“then1-1”);});}).then(() => {console.log(“then2”);});Promise.resolve().then(() => {console.log(“then1”);Promise.resolve().then(() => {

2020-09-12 16:36:38 197

原创 Serverless 初体验:快速开发与部署一个Hello World(Java版)

package com.alibaba.serverless.helloworld;import java.io.UnsupportedEncodingException;import java.util.UUID;import com.aliyun.fc.runtime.Context;import com.aliyun.fc.runtime.FunctionComputeLogger;import com.aliyun.fc.runtime.FunctionInitializer;impor

2020-09-12 16:35:31 128

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除