Javascript – Why is an Array.map() necessary, otherwise the var is undefined? / How to eliminate the Array.map()?
I have some JavaScript code running in node.js which controls puppeteer to automate tasks in a web browser. This code gets a list of links on the page and outputs them to the console: const links = await page.evaluate(() =>…