Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -2577,7 +2577,10 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> master
|
||||||
const max = (...arr) => Math.max(...[].concat(...arr);
|
const max = (...arr) => Math.max(...[].concat(...arr);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -1220,7 +1220,10 @@ lcm([1, 3, 4], 5); // 60
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> master
|
||||||
const max = (...arr) => Math.max(...[].concat(...arr);
|
const max = (...arr) => Math.max(...[].concat(...arr);
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<pre><code class="language-js">max([10, 1, 5]); // 10
|
<pre><code class="language-js">max([10, 1, 5]); // 10
|
||||||
|
|||||||
@ -5,6 +5,10 @@ Returns the maximum value out of two or more numbers/arrays.
|
|||||||
Use `Math.max()` combined with the spread operator (`...`) to get the maximum value in the array.
|
Use `Math.max()` combined with the spread operator (`...`) to get the maximum value in the array.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const max = (...arr) => Math.max(...[].concat(...arr);
|
const max = (...arr) => Math.max(...[].concat(...arr);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user