Need help writing if and if else statements

Where is the bug, this program should change the xxx value from true to false to true to false ad vitam aeternam. Naturally since I am THE luckiest guy on the planet It doesn’t.

// Switch xxx value and show result
var xxx=true;
const btn10 = async () => {
showAlert("Begining xxx value = "+xxx);
if(xxx=true){showAlert(“Looks like it’s true”);xxx=false;}
if(xxx=false){showAlert(“Looks like it’s false”);xxx=true;}
//else{showAlert(“Looks like it isn’t true”);xxx=true;}

Your test conditions are not correct.
You have to use if( xxx == true )
if( xxx === true)

same idea for false


Ho boy! Did I goofed! That can’t happen to me writing this since the 80’s
So, thank you so much for the remainder