Last active
          November 8, 2020 17:22 
        
      - 
      
- 
        Save ever-dev/6764d696703953f41e45f572b54d3062 to your computer and use it in GitHub Desktop. 
    Call asynchronous functions in sequence
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const arr = [...]; | |
| arr.reduce((p, cur) => { | |
| return p.then(()=> { | |
| return doSomething(cur); | |
| }); | |
| }, Promise.resolve()); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment