Given a stringstrand numbern, write a program in Javascript that recursively appends a copy of stringstrn times and returns the resulting string in a sentence explaining whether the resulting string has an odd or even amount of the passed instr.
"" explaining whether the resulting string has an odd or even amount of the passed instr. """
//-> "aaaaaaaaaaa has a(n) odd number of a's" EXAMPLE
function RecursiveCopy(str, n) {if (n === 0) {return "";} else {return RecursiveCopy(str, n - 1) + str;}}
where should i add the if statemnt for the odd or even numbers of str ? that code is not complet
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here