It seems like I'm overlooking a very basic concept here. Why isn't my code reaching the else statement? The issue might be related to the break statement. It's likely something simple that I am missing.
Code Snippet:
<button onclick="yo();">Click Me</button>
JavaScript Code:
var flag = "no";
function yo() {
if (flag == "yes") {
break;
}
else {
window.alert("Hello");
}
}