Home > Net >  If 4 things are true then do ____ . Having a hard time with the If statement and it checking if 4 va
If 4 things are true then do ____ . Having a hard time with the If statement and it checking if 4 va

Time:11-22

   if (test1 === 'hi' && test2 === 'bye' && test3 = 'joe' && test4 === 'sam') {  

console.log("all 4 statements are true!!);
      }; 

getting an r value error which im assuming is syntax. Could someone help me what would be the correct format/method to do this?

CodePudding user response:

if (test1 === 'hi' && test2 === 'bye' && test3 === 'joe' && test4 === 'sam') {  
  console.log("all 4 statements are true!!");
}

CodePudding user response:

you are missing a double quote What I like to do is install prettier, when you cannot format your code, it's mean there are some syntaxs that's are not correct

  • Related