From 117e198b1e37f606cd9ea213801a36e3c2d43185 Mon Sep 17 00:00:00 2001 From: Matheus Genteluci Date: Mon, 18 Mar 2019 04:30:41 -0300 Subject: [PATCH] Return largest numbers in array - Portuguese (#34515) * Return largest numbers in array - Portuguese added solution * Add invocation to the solution --- .../return-largest-numbers-in-arrays.portuguese.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/return-largest-numbers-in-arrays.portuguese.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/return-largest-numbers-in-arrays.portuguese.md index 7bafa032eb..62fb2b13da 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/return-largest-numbers-in-arrays.portuguese.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/return-largest-numbers-in-arrays.portuguese.md @@ -57,6 +57,10 @@ largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 85
```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]]); ```