title: Logical operator || in javascript, 0 stands for Boolean false?
body: <p>I happened to know the following code </p>
  
  <p><strong>Here is the code, and very simple:</strong></p>
  
  <pre><code>var test = 0 || -1 ;
  console.log(test);
  </code></pre>
  
  <p>then the output in the console is <strong>-1</strong> </p>
  
  <p>and somehow i am really new into the javascript,</p>
  
  <p>all i think of is that the <strong>0</strong> stands for Boolean <strong>False</strong> in JS ,and so <code>||</code> operator seems to ignore the 0 and assign the value -1 to the variable </p>
  
  <p>so am i right ? 
  i just want a confirm </p>