Logical Operators Help


I used a video from Youtube for help with this code so the code isn't mine. Im getting the green light but it is only asking me if im looking for a job, instead of asking if I have marketable skills like in the video when I say yes, it always goes to the default and wont ask the other questions. How do I get it to go through and ask me the other questions? Uhhhg.

Replace this line with your code. 
var user= prompt("Are you looking to get a job?").toLowerCase();

switch (user) {
    case 'Yes':
        var answer = prompt ("Do you have any marketable skills?").toLowerCase();
        if (answer== 'Yes'){
            answer= true;
            var choice= false; 
            console.log("You may be just right for this job."); 
            if (answer== true && choice== false){
        var deal= prompt("Is there anything we can do to make you take the job?").toLowerCase();
        if (deal == 'Yes') {
            deal= true; }
        if (deal== true || answer==true){
           console.log("Thank you for taking the job.");
            console.log("Sorry to hear that, best of luck to you.");
            if (answer== "no"){
                answer= false;
                console.log("Sorry to hear that");}
        case 'no': 
            console.log("Have a good day then.");
            case 'maybe':
                console.log("We don't hire maybes.");
                console.log("Did you understand the question?");



var user= prompt("Are you looking to get a job?").toLowerCase();

you convert the user input to lowercase, so then when i enter YES it gets converted to yes. good so then this is the case:

case 'Yes':

this is case sensitive, yes == Yes is false. Make Yes into yes, then it should work


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.