R
Reactiflux

✅ – BIOLOGY SCIENCE – 06-59 Aug 7

✅ – BIOLOGY SCIENCE – 06-59 Aug 7

RRelativPerspektiv8/7/2022
console.time('time');

['', '', '', '', ''].forEach(functionToDoStuff);

console.timeEnd('time');
console.time('time');

['', '', '', '', ''].forEach(functionToDoStuff);

console.timeEnd('time');
just want to check one thing the timeEnd function will run only after the forEach is completed. am i right ?
UUUnknown User8/7/2022
Message Not Public
Sign In & Join Server To View
RRelativPerspektiv8/7/2022
wdym ?
UUUnknown User8/7/2022
Message Not Public
Sign In & Join Server To View
RRelativPerspektiv8/7/2022
yes i did get the time but im not sure that the time which i got was returned after that whole loop was completed or not thats my doubt
UUUnknown User8/7/2022
Message Not Public
Sign In & Join Server To View
RRelativPerspektiv8/7/2022
ok lemme do that now
RRelativPerspektiv8/7/2022
i get a output like this
RRelativPerspektiv8/7/2022
so that means the time end is returned after the whole loop is done right ?
UUUnknown User8/7/2022
Message Not Public
Sign In & Join Server To View
RRelativPerspektiv8/7/2022
ok cool, thank you
UUUnknown User8/7/2022
3 Messages Not Public
Sign In & Join Server To View
RRelativPerspektiv8/7/2022
yep
UUUnknown User8/7/2022
Message Not Public
Sign In & Join Server To View

Looking for more? Join the community!

R
Reactiflux

✅ – BIOLOGY SCIENCE – 06-59 Aug 7

Join Server