and vs or

Edit on GitHub

logic compare

Setup

Tests

  • and

    for (let a = 0; a < 1000; a++) {
      !(0) && !(0);
      !(0) && !(1);
      !(1) && !(0);
      !(1) && !(1);
    }
  • or

    for (let a = 0; a < 1000; a++) {
      !(0 || 0);
      !(0 || 1);
      !(1 || 0);
      !(1 || 1);
    }