the code is as follows: function longTimeDo() { let data = []; let sourse = [1,2,3,4,5]; sourse.forEach(value=>{ setTimeout(()=>{ data.push(value); },1000); }); ?data } ...
I am a novice. I encountered some doubts when learning the asynchronism of javascript , as follows: there is an example code like this in teacher Ruan Yifeng s tutorial: does not particularly understand the operation mechanism of the whole mult...
question 1: why is the middleware in the koa2 framework written in the form of async, rarely in Synchronize mode (that is, without async)? For example, app.use(async (ctx, next) => { const start = new Date() await next() const ms = new Date() ...
Php1 years of development experience, which of the following should be mastered first. I can t remember much right now. Want to learn part of it first and look for a job first? Nginx memcache redis Mongodb MySQL optimization read-write sep...
1: { name: A , age: 10 } 2: [{ id:1, name: A , 1name book: xxx }, { id:2, name: A , book: xxx }] name A book are all stored in Table 2. How to deal with a table structure like this? ...
Wechat s official account obtains the picture and text material and wants to get the cover picture of the picture and text material. Go to thumb_media_id to call the permanent material API "errcode ": 40007, "errmsg ": "invalid media_id hint tempor...
attempt to package a new project after installing npm, webpack and webpack-cli, and the error is as follows: : webpack.config.js is as follows: module.exports = { entry: [ . src js index.js , . src js test.js , . src js test...
wait online in a hurry! ...