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:
committed by
Jaka Kranjc
parent
b24807312c
commit
117e198b1e
@ -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>
|
||||
|
Reference in New Issue
Block a user