Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
For certain conditions, how to terminate the code without throwing error.
Solved! Go to Solution.
Hi,
put your whole code in a self-executing function block and "return" if you want to end the execution.
const result = (function() {
// Your code here
// To end it all, simply "return"
})();
Or if you prefer the arrow function syntax:
const result = (() => {
// Your code here
})();
Hi,
put your whole code in a self-executing function block and "return" if you want to end the execution.
const result = (function() {
// Your code here
// To end it all, simply "return"
})();
Or if you prefer the arrow function syntax:
const result = (() => {
// Your code here
})();
Hi @AP_9587236.
To answer your question, we need to understand the conditions you refer to. Can you provide some details of your use case?
Regards.
--Sharon