We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
每当我感觉理解了亿点点 js 的执行过程的时候 js 都会来打我的脸
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <button class="btn">按钮</button> <script> const btn = document.querySelector('.btn'); btn.addEventListener('click', function () { Promise.resolve().then(()=>console.log("MicorTask 1")) console.log("1") }) btn.addEventListener('click', function () { Promise.resolve().then(()=>console.log("MicorTask 2")) console.log("2") }) // btn.click(); // 看看代码调用和手动调用去区别吧 </script> </body> </html>
// 今日头条面试题 async function async1() { console.log('async1 start') await async2() console.log('async1 end') } async function async2() { console.log('async2') } console.log('script start') setTimeout(function () { console.log('settimeout') }) async1() new Promise(function (resolve) { console.log('promise1') resolve() }).then(function () { console.log('promise2') }) console.log('script end')
rhinel/blog-word#4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
每当我感觉理解了亿点点 js 的执行过程的时候 js 都会来打我的脸
rhinel/blog-word#4
The text was updated successfully, but these errors were encountered: