title: Function return different values on conditional operator
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>//not the answer I want
  var recur = (n, m) =&gt; {
      if (n || m === 1) {
          return 1;
      } else {
          return recur(n - 1, m) + recur(n, m - 1);
      }
  };
  
  //answer I want
  var recur2 = (n, m) =&gt; {
      return 1 ? n || m === 1 : recur2(n - 1, m) + recur2(n, m - 1);
  };
  
  console.log(recur(2, 2));
  console.log(recur(3, 3));
  console.log(recur2(2, 2));
  console.log(recur2(3, 3));</code></pre>
  </div>
  </div>
  </p>
  <p>Results :</p>
  <p><img src="https://i.stack.imgur.com/20GJA.png" alt="result" /></p>
  <hr />
  <p>I am confused about the difference in answers. What's the difference in using conditional operator? I thought they were the same beside shorter syntax?</p>