✅ – BIOLOGY SCIENCE – 06-59 Aug 7

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 ?
14 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
RelativPerspektiv
wdym ?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
RelativPerspektiv
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
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
RelativPerspektiv
ok lemme do that now
RelativPerspektiv
i get a output like this
RelativPerspektiv
so that means the time end is returned after the whole loop is done right ?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
RelativPerspektiv
ok cool, thank you
reactibot
reactibot2y ago
This question has an answer! Thank you for helping 😄 If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1005731999547412522
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
RelativPerspektiv
yep
reactibot
reactibot2y ago
This thread hasn’t had any activity in 12 hours, so it’s now locked. Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1005731999547412522