Advantage of Ternary Operator -: Using ?: reduce the number of line codes and improve the performance of application. Syntax expression-1 ? expression-2 : expression-3 In the above symbol expression-1 is condition and expression-2 and expression-3 will be either value or variable or statement...
Ternary operators are smarter in the sense they are easy to catch, time saver and enables faster coding... 24th Feb 2019, 5:22 AM Atiq 69 + 1 I like the ternary operator. It saves some space, but in my opinion you should never chain them. You can even use it in return statements...
Advantage of Ternary Operator -: Using ?: reduce the number of line codes and improve the performance of application. Syntax expression-1 ? expression-2 : expression-3 In the above symbol expression-1 is condition and expression-2 and expression-3 will be either value or variable or statement...