Answer the question
In order to leave comments, you need to log in
How to implement such a cycle?
Wrote a for loop by iteration from an array, tobish 7 elements of the array, the loop fulfills 7 times and a mustache. But here I had to write a loop within a loop so that the first loop also runs 7 times, but does not wait until the loop runs inside it in order to proceed to the execution of its next iteration, how to do this?
const ads= [
'1',
'2',
'3',
'4',
'5',
'6',
'7'
];
const ports = [
'9052',
'9053',
'9054',
'9055',
'9056',
'9057',
'9058'
];
for (const link of ads) {
console.log(link);
for (const port of ports) {
console.log(link);
await scrape( link.href);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question