var hasName = (name === 'true') ? 'Y' :'N';
condition ? doThisIfTrue : doThisIfFalse
1 > 2 ? console.log(true) : console.log(false)
// returns false
isLoggedIn ? "Logout" : "Login";
let showme || "if the variable showme has nothing inside show this string";
let string = condition ? 'true' : 'false'; // if condition is more than one enclose in brackets
let condition && 'show this string if condition is true';
const answer = x > 10 ? "greater than 10" : "less than 10";
// or
if (something)
return;
// other code here