title: Evaluating Truthy in switch statement
body: <p>I am trying to determine if an object property value is "truthy" via a switch statement.</p>
  
  <p>Using this sample block:</p>
  
  <pre><code>var test = {
    foo: "bar"
  }
  
  switch(true) {
    case test.foo:
      console.log("success in switch");
      break
    default:
      console.log("no success in switch");
      break
  }
  
  if (test.foo) {
    console.log("success in if");
  } else {
    console.log("no success in if");
  }
  </code></pre>
  
  <p>ends up logging:</p>
  
  <pre><code>"no success in switch"
  "success in if"
  </code></pre>
  
  <p>What is the proper way to do this?</p>