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. ') ;
}