From 222948d5aca27f03d8a91bfa21d6c49cc82c663d Mon Sep 17 00:00:00 2001 From: Matheus Genteluci Date: Sat, 16 Mar 2019 17:30:58 -0300 Subject: [PATCH] Reverse a String - Portuguese (#34513) * Reverse a String - Portuguese * Add invocation Co-Authored-By: MGenteluci --- .../reverse-a-string.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/reverse-a-string.portuguese.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/reverse-a-string.portuguese.md index 973fe775ab..61fdf9b2cb 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/reverse-a-string.portuguese.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/reverse-a-string.portuguese.md @@ -56,6 +56,10 @@ reverseString("hello");
```js -// solution required +function reverseString(str) { + return str.split('').reverse().join(''); +} + +reverseString("hello"); ```