3 ms·
> if (success = true) // Oops! Hence the better way of comparing literals or consts to vars: if ( true = success ) // Compile-time error will enlighten you
by kmoser 1y ago
> if (success = true) // Oops!
Hence the better way of comparing literals or consts to vars:
if ( true = success ) // Compile-time error will enlighten you
- brontitall 1y agohttps://en.wikipedia.org/wiki/Yoda_conditions https://en.wikipedia.org/wiki/Yoda_conditions