title: Any way to toggle between two strings using one piece of JavaScript?
body: <p>I want to do something like</p>
  
  <pre><code>if(something.val() == 'string1')
  {
       something.val('string2');
  }
  else if(something.val() == 'string2')
  {
      something.val('string1')
  }
  </code></pre>
  
  <p>But in one line of code. I can't quite remember how it's done, but it involves question marks and colons...</p>