How Do I Run An Element ID Check?

Below you’ll see two element IDs in the combined “onClick” event. Regardless of which button is clicked, I need both buttons to run the “indexInit” function. But I also need each button to set a variable. These variables are different for each button. Is there a way to use an if statement, the condition for which is defined by the element ID?

$w("#index024,#index025").onClick(event => {
        // if statment here!    
        indexInit();
    })

I know how to write if statements. I just don’t know how to check the ID. I appreciate any help or ideas. Figuring this out will save me a ton of code.

Thank you so much.

Something like this one…

$w("#index024, #index025").onClick(event=>{console.log(event.target.id);
	 if (event.target.id === "index024" ) {startProcess1();}
	else if (event.target.id === "index025" ) {startProcess2();}
	else  {startProcess3();}
});

function startProcess1() {...}
function startProcess2() {...}
function startProcess3() {...}

OMG, this solution is so sexy, you’re the Velo version of porn. In fact, your porn name could be Veloptuous…

Thanks so much, man.

Say goodbye to all my export functions.