3 ms·
At first I thought this was something to do with ternary operators[0]. I know in JS you can do something like this: var resultofexpression = conditionasboo
by cyberlab 6y ago
At first I thought this was something to do with ternary operators[0]. I know in JS you can do something like this:
var resultofexpression = conditionasboolean ? truepart: falsepart;
You can actually get away with /never/ using if...else statements and do everything with ternary operators, but it's harder to comprehend the code.
Also as a separate observation: Adding quantum computers into the mix of these writings would really jazz it up.
[0] https://www.javascripttutorial.net/javascript-ternary-operator/ https://www.javascripttutorial.net/javascript-ternary-operat...
- Twixes 6y agoI suppose in three-valued logic the equivalent would be a… quaternary conditional operator