Travis build: 880

This commit is contained in:
Travis CI
2018-01-03 06:02:08 +00:00
parent e79afda767
commit 5110354d3c
2 changed files with 2 additions and 2 deletions

View File

@ -3340,7 +3340,7 @@ standardDeviation([10, 2, 38, 23, 38, 23, 21], true); // 12.29899614287479 (popu
### sum
Returns the sum of an of two or more numbers/arrays.
Returns the sum of two or more numbers/arrays.
Use `Array.reduce()` to add each value to an accumulator, initialized with a value of `0`.

View File

@ -732,7 +732,7 @@ solveRPN('2 3 ^'); //8
};
</code></pre><pre><code class="language-js">standardDeviation([10, 2, 38, 23, 38, 23, 21]); // 13.284434142114991 (sample)
standardDeviation([10, 2, 38, 23, 38, 23, 21], true); // 12.29899614287479 (population)
</code></pre></div></div><br/><div class="card fluid"><div class="section double-padded"><h3 id="sum">sum</h3></div><div class="section double-padded"><p>Returns the sum of an of two or more numbers/arrays.</p><p>Use <code>Array.reduce()</code> to add each value to an accumulator, initialized with a value of <code>0</code>.</p><pre><code class="language-js">const sum = (...arr) =&gt; [].concat(...arr).reduce((acc, val) =&gt; acc + val, 0);
</code></pre></div></div><br/><div class="card fluid"><div class="section double-padded"><h3 id="sum">sum</h3></div><div class="section double-padded"><p>Returns the sum of two or more numbers/arrays.</p><p>Use <code>Array.reduce()</code> to add each value to an accumulator, initialized with a value of <code>0</code>.</p><pre><code class="language-js">const sum = (...arr) =&gt; [].concat(...arr).reduce((acc, val) =&gt; acc + val, 0);
</code></pre><pre><code class="language-js">sum([1, 2, 3, 4]); // 10
</code></pre></div></div><br/><div class="card fluid"><div class="section double-padded"><h3 id="sumpower">sumPower</h3></div><div class="section double-padded"><p>Returns the sum of the powers of all the numbers from <code>start</code> to <code>end</code> (both inclusive).</p><p>Use <code>Array.fill()</code> to create an array of all the numbers in the target range, <code>Array.map()</code> and the exponent operator (<code>**</code>) to raise them to <code>power</code> and <code>Array.reduce()</code> to add them together. Omit the second argument, <code>power</code>, to use a default power of <code>2</code>. Omit the third argument, <code>start</code>, to use a default starting value of <code>1</code>.</p><pre><code class="language-js">const sumPower = (end, power = 2, start = 1) =&gt;
Array(end + 1 - start)