qw.js 216 B

12345678910111213141516171819
  1. function a(){
  2. setTimeout(() => {
  3. console.log(2000)
  4. }, 2000);
  5. }
  6. function b(){
  7. setTimeout(() => {
  8. console.log(1000)
  9. }, 1000);
  10. }
  11. async function ab(){
  12. await a()
  13. await b()
  14. }
  15. ab()