What's wrong with my code? please help


#1

var user = prompt("are you going to learn java","type YES or NO").toUpperCase();
switch (user){
case 'YES':
var genious = prompt("are you genious","type YES or NO);
var stupid = prompt("are you stupid?","type YES or NO");
if (genious==='YES' || stupid==='NO');
{
console.log("good keep going");
}
else
{
console.log("you are not able to learn");
}

    break;
    case 'NO':
        var Cprogram = prompt ("do you know Cprogram?","type YES or NO");
        var Cplus= prompt("do you know Cplus?","type YES or NO");
        if (Cprogram ==='YES' && Cplus === 'YES'){

        console.log("fair");
        }
        else
        {

            console.log("not good");
        }
            break;
            default:
            console.log("Thukula thongedu");
            break;

}


#2

You should close your second string here.

And, remove the semi-colon after the bracket. It's an obstruction.


#3

thank you thank you thank you

thanks a lot
it took half a day..............


#4

You're welcome.

I'm glad I could help. :slight_smile:


#5

after completing this, can i get certificate for this cource?? by writing any exams, something like that


#6

I am not aware of such. It might be available on pro, but also unsure too.


#7

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