title: JavaScript convert boolean to string according to PHP's practice
body: <p>Is there some way to convert a boolean to string in the same way as PHP does it?</p>
  
  <p>So that <code>false</code> becomes <code>''</code> (empty string) and <code>true</code> becomes <code>1</code>.</p>
  
  <p>As of right now, <code>true.toString()</code> becomes <code>"true"</code> and <code>false.toString()</code> becomes <code>"false"</code>, not what I want.</p>