javascript exit out of if statement
function example(bool){
label: if(bool){
console.log("a");
break label;
console.log("never gets here");
}
console.log("b");
}
example(true); //logs a then b doesnt return out of function
javascript exit out of if statement
function example(bool){
label: if(bool){
console.log("a");
break label;
console.log("never gets here");
}
console.log("b");
}
example(true); //logs a then b doesnt return out of function
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us