Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

If 4 things are true then do ____ . Having a hard time with the If statement and it checking if 4 values are true to execute the code

   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?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading