Vue learning notes - front and back end interaction foundation and Promise

1, Front and rear end interaction Foundation 1. Concept What is front-end and back-end interaction? In fact, it refers to the process that the front end sends a request to the back end through the interface, the back end returns the corresponding data after receiving the request, and the front end makes a corresponding display or jump accordi ...

Posted by alfoxy on Wed, 13 Oct 2021 04:55:40 +0200

Disadvantages and solutions of JS promise

Take an example I want to print 1 after 1s, 2 after 1s, and 3 after 3s Traditional asynchronous programming implementation console.log(new Date) setTimeout(()=>{ console.log(new Date,1) setTimeout(()=>{ console.log(new Date,2) setTimeout(()=>{ console.log(new Date,3) },3000) },2000) },1000)   Promise implement ...

Posted by jonoc33 on Fri, 24 Sep 2021 14:45:04 +0200

Promise is a must for beginners from entry to mastery

Reference for instance object, function object, callback and other related knowledge: this Promise introduction Promise is a new technology (ES6 specification) and a new solution for asynchronous programming in JS (the old solution was to simply use callback functions).Grammatically, Promise is a constructor (I have all, reject and resolv ...

Posted by dardsemail on Thu, 23 Sep 2021 10:22:13 +0200