Promise对象中[[PromiseResult]]的取值

        我在axios中return参数的时候在另一个JS中接收到了一个promise对象,为了获取其中的[[PromiseResult]]的内容,可使用then()函数。

        示例如下:

Promise对象中[[PromiseResult]]的取值_第1张图片

        通过传入箭头函数作为参数,即可在res变量接收到 [[PromiseResult]]的值。

你可能感兴趣的:(前端开发,踩过的坑,javascript,前端,es6)