Repeat String Solution

This commit is contained in:
Karem Quiroz 2020-07-01 18:04:47 -05:00 committed by GitHub
parent 888383a44e
commit e27bc41eda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,10 @@
const repeatString = function() { const repeatString = function(term , repeat) {
if( term < 0) return 'ERROR';
let str = 0
for( let i = 0 ; i < repeat ; i++){
str += term
}
return str
} }
module.exports = repeatString module.exports = repeatString