Completed 1-4

This commit is contained in:
Thuan Bui
2025-02-22 10:23:40 +09:00
parent d4421b055f
commit c415382137
7 changed files with 68 additions and 23 deletions
+9 -2
View File
@@ -1,5 +1,12 @@
const repeatString = function() {
const repeatString = function(string,number) {
let fullString = "";
if (number < 0) {
return "ERROR";
}
for (i = 0; i < number; i++) {
fullString += string;
}
return fullString;
};
// Do not edit below this line