javascript compact if condition code example
Example 1: shorthand if statment in js
isLoggedIn ? "Logout" : "Login";
Example 2: single if statement js true false
condition ? exprIfTrue : exprIfFalse
isLoggedIn ? "Logout" : "Login";
condition ? exprIfTrue : exprIfFalse