3 ms·
As others pointed out, it's not really better than an if (and actually worse in this case because you might not require the assignment) To me it works in short
by raverbashing 9y ago
As others pointed out, it's not really better than an if (and actually worse in this case because you might not require the assignment)
To me it works in short expressions that do return a value so number_of_things = some_type ? 5 : 1