4 ms·
Why not do: const y = x ? true : false;
by askmrsinh 1y ago
Why not do:
const y = x ? true : false;
- stevage 1y agoI'm talking about cases with additional logic that's too long for a ternary.
- 1718627440 1y agoThat sounds like a more complicated way to write const y = (bool)x; or const bool y = x;