I am trying to compare two string using below code
var roomStatus = $("#room-status").val().trim();
var inService = "In Service";
var caInService = "CA In Service";
if (roomStatus !== inService || roomStatus !== caInService)
{
swal({
title: "Allotment Cancelled",
type: "error",
text: "The Student cannot be alloted to this Room because this room is "+roomStatus,
});
return false;
}
The above code is not comparing if roomStatus equals In Service. It always falls in if condition. Please help !!!