Multiple Variables in 1 If statement

javascript

#1

Hello , im new at javascript.

and i wrote this code, but it doesnt do specificly what i want.
for example, age 13 question answer= yes , should alert You should\'t be driving

can you take a look ?
youll understand immidiately when u run it

var name = prompt("What is your name?") ; 
var age = prompt(' How old are you ?' ) ; 
var Question = prompt(' Can you drive ? ' ) 




if ( age < 16  &&  Question == yes ) 
{ 
	alert(' You should\'t be driving ');
}  




else if ( age == 16 ) 
{
    alert ( ' you can finally Drive ' );
} 




else if ( age > 16 ) 
{ 
    alert ( ' you\'ve been probably driving already' );
}




if ( age < 16 && Question == no ) 
{ 
    alert ( ' You can\'t Drive ' );
}




else if ( age == 16 && Question == no ) 
{
	alert ( ' What are you waiting For \! ');
} 
else 
{ 
	alert ( ' you\'ve been probably driving already. ') ;
}

#2

yes and no need to be "yes" and "no" otherwise they would be confused with variables.


#3
Question == no // <<--- no is a String should be "no"
Question == yes // <<--- yes is a String should be "yes"