title: Shorthand for if-else statement
body: <p>I have some code with a lot of if/else statements similar to this:</p>
  
  <pre><code>var name = "true";
  
  if (name == "true") {
      var hasName = 'Y';
  } else if (name == "false") {
      var hasName = 'N';
  };
  </code></pre>
  
  <p>But is there a way to make these statements shorter? Something like <code>? "true" : "false"</code> ...</p>