Exit script in appconnect

I seem to be missing something here

I am running if statements and if the condition is not met I want the flow to exit.

Similar to:
function dosomething(invar) {
if (invar == false) {
if (invar == true) {

Instead I have to do noob way:

Community Page
Last updated: