str (primer argumento) para num veces (segundo argumento). Devuelve una cadena vacía si num no es un número positivo. Recuerda usar Read-Search-Ask si te atascas. Escribe tu propio código. repeatStringNumTimes("*", 3) debe devolver "***" .'
testString: 'assert(repeatStringNumTimes("*", 3) === "***", "repeatStringNumTimes("*", 3) should return "***".");'
- text: 'repeatStringNumTimes("abc", 3) debe devolver "abcabcabc" .'
testString: 'assert(repeatStringNumTimes("abc", 3) === "abcabcabc", "repeatStringNumTimes("abc", 3) should return "abcabcabc".");'
- text: 'repeatStringNumTimes("abc", 4) debe devolver "abcabcabcabc" .'
testString: 'assert(repeatStringNumTimes("abc", 4) === "abcabcabcabc", "repeatStringNumTimes("abc", 4) should return "abcabcabcabc".");'
- text: 'repeatStringNumTimes("abc", 1) debe devolver "abc" .'
testString: 'assert(repeatStringNumTimes("abc", 1) === "abc", "repeatStringNumTimes("abc", 1) should return "abc".");'
- text: 'repeatStringNumTimes("*", 8) debe devolver "********" .'
testString: 'assert(repeatStringNumTimes("*", 8) === "********", "repeatStringNumTimes("*", 8) should return "********".");'
- text: 'repeatStringNumTimes("abc", -2) debe devolver "" .'
testString: 'assert(repeatStringNumTimes("abc", -2) === "", "repeatStringNumTimes("abc", -2) should return "".");'
- text: El método repeat() incorporado no debe utilizarse
testString: 'assert(!/\.repeat/g.test(code), "The built-in repeat()-method should not be used");'
```