title: How to write a ternary operator (aka if) expression without repeating yourself
body: <p>For example, something like this:</p>
  
  <pre><code>var value = someArray.indexOf(3) !== -1 ? someArray.indexOf(3) : 0
  </code></pre>
  
  <p>Is there a better way to write that? Again, I am not seeking an answer to the exact question above, just an example of when you might have repeated operands in ternary operator expressions...</p>