| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
/*
*
* Prosen Ghosh
* American International University - Bangladesh (AIUB)
*
*/
Problem:
Write a function called repeatStr which repeats the given string string exactly n times.
repeatStr(6, "I") // "IIIIII" repeatStr(5, "Hello") // "HelloHelloHelloHelloHello"
Solution:
function repeatStr (n, s) {
return s.repeat(n);
}| Back | FazBrowse Home | New Git URL |