javascript – Early exit from function?
#short
#javascript
I have a function:
function myfunction() {
if (a == ‘stop’) // How can I stop the function here?
}
Is there something like exit() in JavaScript?
javascript – Early exit from function?
#short
#javascript
I have a function:
function myfunction() {
if (a == ‘stop’) // How can I stop the function here?
}
Is there something like exit() in JavaScript?