mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-06-05 15:09:09 +09:00
remove class based exercises
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
var repeatString = function() {
|
||||
|
||||
var repeatString = function(string, num) {
|
||||
if (num < 0) return 'ERROR'
|
||||
let returnValue = ''
|
||||
for(let i = 0; i < num; i++) {
|
||||
returnValue = returnValue + string
|
||||
}
|
||||
return returnValue
|
||||
}
|
||||
|
||||
module.exports = repeatString
|
||||
|
||||
Reference in New Issue
Block a user