title: To get empty array
body: <p>I wrote a code but i met a some strange thing.</p>
  <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>function countPositivesSumNegatives(input) {
    let count = 0;
    let positive = 0;
    let negative = 0;
    for (let i = 0; i &lt; input.length; i++) {
      if (input[i] &lt; 0) {
        negative += input[i];
      }
      if (input[i] &gt; 0) {
        count++;
        positive = count;
      }
      if (input == 0) {
        return [];
      }
    }
    return [positive, negative];
  }
  
  console.log(countPositivesSumNegatives([0, 0]));</code></pre>
  </div>
  </div>
  </p>
  <p>Why output is [0, 0] instead of []  ?
  I'm trying to get just empty array []</p>
  <p>Output has to be:</p>
  <p>countPositivesSumNegatives([1, 2, 3, -1, -3]) -&gt; [3, -4]</p>
  <p>countPositivesSumNegatives([0, 0]) -&gt; []</p>