Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
Puppeteer Sequential Rendering

I'm going to do some pages using puppeteer, but I can't get the results asynchronously.

const puppeteer = require('puppeteer');

const array = ["a","b","c","d","e"];
const chunkSize = 2;

for(var i=0;i<array.length;i+=chunkSize){
const chunk = array.slice(i, i + chunkSize);
console.log('chunk=',chunk);
  for(var a=0;a<chunk.length;a++){
    (async () => {
      const browser = await puppeteer.launch({headless:false})
      const page = await browser.newPage();
      console.log(chunk[a]);
    })()
  }
}

result ; d b d undefined b

my expectation : a b c d e

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!