async function async1(){ console.log( async1 start ) await async2() console.log( async1 end ) } async function async2(){ console.log( async2 ) } setTimeout(function(){ console.log( setTimeout ) },0) async1(); new Promise(fu...
what is the real implementation principle of some of the new es6 and es7 grammars we usually use? Is it understandably the real implementation of the es5 code that is converted through babel? ...
I tried to encapsulate it, but it didn t work. It was embarrassing. has it been encapsulated by a boss? Ask for a code to learn, hard work you sent down, thank you! by the way, you need an encapsulated call like async await ...
The array expansion operator in es6 is actually because the array is linear with the Symbol.iterator attribute. But the object doesn t have an iterator interface, so how can you use the expansion operator? And. How on earth is the unfold operator implem...
the third-party js, I called has several methods to execute promise, as follows: function init(){ a(); b(); c(); .... ... } function a(){ var q = [x,y]; promise Promise.all(q).then(function(arr){ ..... ...
the asynchronous loading code is as follows: index.js: require.ensure([ .. mall order ],function(require){ var order = require( .. mall order ); }); require.ensure([],function(require){ var order = require( .. mall order ); ...
problem description for example, the following code: @one() class FaqDetail extends Component {} What does this mean by asking for a detailed explanation? What does it do? why should there be a comment on the class? ...
...
1 function GenFunc () { new Promise(function(resolve) { resolve() }).then(function() { console.log( 1 ) }) console.log( 2 ) } GenFunc() 2 1 2 async function GenFunc () { new Promise(function(resolve) { ...
I tried normal and effective in non-strict mode ...