Javascript is throwing an exception if I attempt to use a break; statement inside an if else. so I'm using this code in Salesforce Classic Button Javascript
I have multiple if/else conditions.
if (condition1...) {
//do stuffs
else {
//show message 1
}
if (condition2...) {
//do stuffs
else {
//show message 2
}
How do I overcome this? I tried to use break
or return
I get the unexpected exception.
PROBLEM: I'm getting both messages from condition 1 and condition 2