This question already has an answer here:
- Javascript if statements not working 3 answers
Im writing an if statement that allows to display a choice based on users input,
Im basically trying to say if something like if they pick 2-4 nights then allow the option.
This is what i've written:
if (userObj.guests = 2 || userObj.guests <=4 && userObj.dayDifference <=10 ) {
$('.motel_container').removeClass('disable')
}
How can i only allow the if statement to work if they pick 2 - 4 nights only.
Aucun commentaire:
Enregistrer un commentaire