Return largest numbers in array - Portuguese (#34515)

* Return largest numbers in array - Portuguese

added solution

* Add invocation to the solution
This commit is contained in:
Matheus Genteluci
2019-03-18 04:30:41 -03:00
committed by Jaka Kranjc
parent b24807312c
commit 117e198b1e

View File

@ -57,6 +57,10 @@ largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 85
<section id='solution'>
```js
// solution required
function largestOfFour(arr) {
return arr.map(i => Math.max(...i));
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
```
</section>