commit
8d105cceb6
|
@ -1,5 +1,5 @@
|
||||||
const helloWorld = function() {
|
const helloWorld = function() {
|
||||||
return 'Hello, World!'
|
return 'Hello, World!';
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = helloWorld;
|
module.exports = helloWorld;
|
||||||
|
|
|
@ -2,9 +2,9 @@ const repeatString = function(string, num) {
|
||||||
let repeatedString = ''
|
let repeatedString = ''
|
||||||
if (num < 0) {return "ERROR"}
|
if (num < 0) {return "ERROR"}
|
||||||
for (let i = 0; i < num; i++) {
|
for (let i = 0; i < num; i++) {
|
||||||
repeatedString += string
|
repeatedString += string;
|
||||||
}
|
}
|
||||||
return repeatedString
|
return repeatedString;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Do not edit below this line
|
// Do not edit below this line
|
||||||
|
|
|
@ -3,7 +3,7 @@ const reverseString = function(string) {
|
||||||
for (let i = string.length - 1; i >= 0; i--) {
|
for (let i = string.length - 1; i >= 0; i--) {
|
||||||
reversedArray.push(string[i])
|
reversedArray.push(string[i])
|
||||||
}
|
}
|
||||||
return reversedArray.join('')
|
return reversedArray.join('');
|
||||||
};
|
};
|
||||||
|
|
||||||
// Do not edit below this line
|
// Do not edit below this line
|
||||||
|
|
Loading…
Reference in New Issue