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:

Use response step.
It exits the SA with defined status code and message/data.

there is no response step in the pageflow (frontend) unless if I am missing a trick.

Ah… Missed that it was flow.
Using conditions is the only way I know of.