title: Conditional Operators in Javascript
body: <p>Is it ok to use conditional operators like a statement like so?</p>
  
  <pre><code>(x == y) ? alert("yo!") : alert("meh!");
  </code></pre>
  
  <p>Or is it more correct to use it to assign a value like so?</p>
  
  <pre><code>z = (x == y) ? "yo!" : "meh!";
  </code></pre>
  
  <p>If it's not incorrect to use it like a statement, then is it possible to add more than one line of code for execution like so? Is it more correct to use ifthen and switch statements for multiple lines of code?</p>
  
  <pre><code>(x == y) ? (alert("yo!"), document.write("woot!")) : (alert("meh!"), document.write("blah!"));
  </code></pre>