I guess. The only way I figured it out was making use of setTimeout, but, as you explained in another comment, it's not 100% guaranteed it will always work and can behave in unexpected ways.
Hopefully, somebody comes up with some weird solutions :)
That is something I did in a technical test for a job interview. Why couldn't we use the event loop mechanism to trigger something as soon as we exit the function ?
Nevertheless, that was not they were expecting ahah.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I guess. The only way I figured it out was making use of setTimeout, but, as you explained in another comment, it's not 100% guaranteed it will always work and can behave in unexpected ways.
Hopefully, somebody comes up with some weird solutions :)
That is something I did in a technical test for a job interview. Why couldn't we use the event loop mechanism to trigger something as soon as we exit the function ?
Nevertheless, that was not they were expecting ahah.