Javascript String Equals

Description

Javascript String Equals

let strName = "Shelley";

if (strName == "Shelley") {
   console.log("Your name is Shelley! Good for you!");
} else {/*from w ww.j  a  v  a  2 s .c o  m*/
   console.log("Your name isn't Shelley. Bummer.");
}
  
strName = "Tom";

if (strName == "Shelley") {
   console.log("Your name is Shelley! Good for you!");
} else {
   console.log("Your name isn't Shelley. Bummer.");
}



PreviousNext

Related