0

I am tried something like this

let x = 80;
let y = 40;
if ((x && y) == 80) {
   alert("true")
} else {
   alert("false");
}

But I came to know that it works like if x or y is equal to 80 then do that. But I need something which can work as if x is equal to 80 then alert true and if y is not equal then alert false. In other words, I want to use them in one line like that but result should come separately. how can I do it?
VLAZ
  • 26,331
  • 9
  • 49
  • 67

0 Answers0