in che senso ???
di solito è

if (variabile1 == variabile2){
alert("le stringhe sono uguali")
}else{
alert("le stringhe sono diverse")
}