Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! 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