8000 test exercise 2 · pablorengi/javascript-exercises@2b50e5f · GitHub
[go: up one dir, main page]

Skip to content

Commit 2b50e5f

Browse files
committed
test exercise 2
1 parent 8efcc52 commit 2b50e5f

File tree

1 file chan 8000 ged

+6
-2
lines changed

1 file changed

+6
-2
lines changed

02_repeatString/repeatString.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
const repeatString = function() {
2-
1+
const repeatString = function(name, number) {
2+
let result = '';
3+
for(let i = 0; i < number; i++) {
4+
result += name;
5+
}
6+
return result;
37
};
48

59
// Do not edit below this line

0 commit comments

Comments
 (0)
0