If this AND That then do something

I can’t seem to find this simple statement. I need to make an IF/AND/THEN statement as featured below. I know the example below does not work. Does anyone know how this should be written?

if(varA == "A") + (varB == "B") {

trace(“varA & varB are equal to A and B”)
}