Hey there, JavaScript enthusiast! 👋
Are you ready to unravel the magic behind event loops? It's one of the most exciting (and misunderstood) concep...
For further actions, you may consider blocking this person and/or reporting abuse
If I am reading this correctly, currently the function heavyTask() creates a macrotask for every single incrementation. This probably introduces some overhead.
For further optimization, I believe creating batched macrotasks or using web workers might be even better.
I would suggest combining both techniques and create multiple web workers (e.g., 10) and split the work among them.
If you anyone has a way for even better optimization, I would love to hear it.
it's answer is B
Yes , @john12 , it's correct.
B is the correct answer
Well done!
Answer is b
Indeed
B
Yes @moglimanani , it's correct. Do you know the reason ?
B
Absolutely right @anand_gautam_608efaa21e58 . Do you the know the reason of it's correctness ?
B is the right answer.
correct @emybel !!
The answer is B
Absolutely right @shivani_singh_399f24510a6
B
Spot on !
B. 1️⃣ Hello, 4️⃣ Goodbye, 3️⃣ Promise, 2️⃣ Timeout
Thanks
@fandyvn , yes it's correct.
Very cool post 😎
B
What does the code after the line "Better Example (Using setTimeout for Chunking)" mean? Is it infinity recursion? Why?