The ternary operator is a simplified conditional operator like if /
else.condition ? <expression if true> : <expression if false>
/
elseif (authenticated) {
renderApp();
} else {
renderLogin();
}Here is the same example using a ternary operator:
With Ternary authenticated ? renderApp() : renderLogin();