Repeat a String Repeat a String - Portuguese (#34581)

Solution added to .md
This commit is contained in:
Matheus Genteluci
2019-03-16 16:48:46 -03:00
committed by Jaka Kranjc
parent 55e7b07eb2
commit 7a0864d716

View File

@ -63,6 +63,12 @@ repeatStringNumTimes("abc", 3);
<section id='solution'>
```js
// solution required
function repeatStringNumTimes(str, num) {
let result = '';
for(let i = 0; i < num; i++) {
result += str;
}
return result;
}
```
</section>