We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A small proposal on capitalizeWords recursive function. Even though your implementation is short and elegant, but that does not involve a recursion.
So I would suggest the code below:
function capitalizeWords (array) { if (array.length === 1) { return [array[0].toUpperCase()]; } let res = capitalizeWords(array.slice(0, -1)); res.push(array.slice(array.length-1)[0].toUpperCase()); return res; }
Thanks.
The text was updated successfully, but these errors were encountered:
Thanks for the input! Just updated the recursive solution for this Algo.
Sorry, something went wrong.
No branches or pull requests
A small proposal on capitalizeWords recursive function.
Even though your implementation is short and elegant, but that does not involve a recursion.
So I would suggest the code below:
Thanks.
The text was updated successfully, but these errors were encountered: