I recently came to this thread, and had a quick question on the syntax used in the first answer. @ggorlen used this syntax/notation in the for loop that I've never seen before and couldn't find any answers online:
for (;;) {
try {
await page.waitForFunction(
`${thumbs.length} !==
document.querySelectorAll("#video-title").length`,
{timeout: 10000}
);
}
catch (err) {
break;
}
thumbs = await page.$$eval("#video-title", els => {
els.at(-1).scrollIntoView();
return els.map(e => e.getAttribute("title"));
});
}
What does the for(;;) {...} do?
Thanks!
I just have a question on the syntax used, and couldn't find an answer.