代码示例:
<script type="text/javascript"> new Promise(function(resolve, reject) { console.log(111); resolve(222); }).then(function(value) { console.log(value); return 333; }).then(function(value) { console.log(value); throw "An Error"; }).catch(function(err) { console.log(err); }).finally(function(){ console.log("End"); }); </script>
标签:function,console,log,JavaScript,value,学习,Promise From: https://www.cnblogs.com/Tpf386/p/17579653.html