I'd like to exit my current call stack in javascript, in order not to explode the call stack size, but I don't have access to the setTimeout() call ie:
the function setTimeoutdon't exist in my environment :)
I still need to exit the current call stack as I reach the call stack size limit.
The environment is "parse.com" and CloudCode Modules, if any one know what's running behind, that could help as well!
Any guess?
PS: It's not because the only thing you know is a web browser environment and DOM node manipulation or even worse Javascript that you need to -1 the question, this one is really pertinent. Not every function is implemented everywhere. PS2: There's no source code attached as it's more a theoretical question than an applied question!
Javascript supports throwing exception objects (which can be anything really), which can exit the call stack as much as you want. This MDN page might be of some use:
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Statements/try...catch
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With