Logical operators - syntax error: syntax error


Excercise I am stuck at: https://www.codecademy.com/en/courses/javascript-beginner-en-ZA2rb/0/5?curriculum_id=506324b3a7dffd00020bf661#

It constantly says "SyntaxError: Syntax error", even though I can't find a single mistake in my code (included below). Would be grateful if someone could help me out, because I seem to be really stuck.

var user = prompt("Are you ready?", "Enter your answer here").toLowerCase();
        console.log("Hallelujah! Let's move on, then.");
        var yui = prompt("Are you STRONG or SMART?","Enter your pathetic answer here.");
        if(yui === 'smart') || (yui === 'strong'){
            console.log("It matters not, for you shall proceed anyway.");    
            console.log("So neither? Such a pity.");    
        console.log("Then you SHALL NOT PASS!!!");
        var oneone = prompt("Wait, turn back! One more chance! Are you ready?", "Enter yes here.");
        var twotwo = prompt("Are you sure?","Enter yes here.");
        if(oneone === 'yes') && (twotwo ==='yes'){
            console.log("FINALLY! OK, let's move on.");
            console.log("I hope it was a misunderstanding, otherwise, someone is done for.");
        console.log("What the hell did you enter? Is that supposed to be an answer???");


@betasolver64029 You must remove these parans (these()):

if(yui === 'smart') << this || ( << and this yui === 'strong'){

if(oneone === 'yes') << this && ( << and this twotwo ==='yes'){

Hope this helps



Thank you a ton, it actually worked! I just got used to checking for several conditions this way in C :slight_smile:


That's great. Glad you got it.


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