Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 629 Bytes

what_is_the_easiest_multi_condition_checking.md

File metadata and controls

26 lines (18 loc) · 629 Bytes

What is the easiest multi-condition checking?

The easiest way to check multiple conditions is by using logical operators like && (AND) or || (OR).

Example using && (AND):

let x = 5, y = 10;
if (x > 0 && y > 5) {
  console.log('Both conditions are true');
}

Example using || (OR):

let x = 5, y = 2;
if (x > 0 || y > 5) {
  console.log('At least one condition is true');
}

Tags: basic, JavaScript, Conditionals