+ 2

pls Help with Setinterval and ForEach

I'm trying to use a setInterval() on a nodelist with forEach(item), but I wanted the items to be shown every (number) interval of time, but every time I try to do that, all items within the nodelist are shown in one time.. how can I get around this?

16th Apr 2023, 7:21 PM
Gileade Lima
Gileade Lima - avatar
3 Answers
+ 5
Upload your code, please. It will be more understandable
16th Apr 2023, 7:41 PM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
+ 2
Don't use for each, use a generator function and call the .next() method each interval
17th Apr 2023, 4:18 AM
Mirielle - avatar
+ 1
Right way to upload your code: 1. Edit your question description 2. Tap "+" button, then "Code" 3. Select your code Pls don't: 1. Copy and paste the code 2. Put the code in comments
17th Apr 2023, 1:31 AM
Emerson Prado
Emerson Prado - avatar