JSFiddle - React, Tailwind, and code Playground

JavaScript

A = function(r) {debug += 'A'; return r; };
B = function(r) {debug += 'B'; return r; };
C = function(r) {debug += 'C'; return r; };

debug = '';
(A(1))&&B(1)||C(1); debug += '|';
(A(1))&&B(0)||C(1); debug += '|'; // here is the difference
(A(0))&&B(1)||C(1); debug += '|';
(A(0))&&B(0)||C(1);
console.log(debug);

console.log('---');

debug = '';
(A(1))?B(1):C(1); debug += '|';
(A(1))?B(0):C(1); debug += '|';
(A(0))?B(1):C(1); debug += '|';
(A(0))?B(0):C(1);
console.log(debug);