It\'s well-known that break and continue can be used inside a loop:
break
continue
Normally you can't. You can only use return; to discontinue code execution in an if statement.
return;
Using break;
if (true) { break; } console.log(1)
Using continue;
if (true) { continue; } console.log(1)