[resolved] simplify condition

[resolved] simplify condition

if (primo in ["Mr.","Mrs.","Miss","Lady","Baronet"]){alert("do not use title")}


should this condition work, or is it wrongly constructed?

I want a simplified condition, without repeating (primo=="..."|primo=="..."|primo=="..."|primo=="...")