hi, my code run well but when i submit the task show me this error All other characters of the string excepts the fiirst one, should reamian the same", i donĀ“t know becouse in mi function y create a new string for resolve the task, if someone know a better method for make this , i wil be grateful. here is my answer. here is the error
Your code is too long. The code should be smaller and look like this:
export const capitalizeFirstWord = (s) => { return s.replace(s[0], s[0].toUpperCase()); // return the modified variable S according to the following conditions: you need to change the first character of the variable S to the first variable with Caps) }
Correct me if I'm wrong @Coderslang_Master
thanks for your answer, your code is to clean jaja, but i realize that the answer was wrong, so i fixed ,
becouse the correct answer is : London is the capital of Great Britain.
but i'mgoing to use your code in future tasks jajaj thanks a lot.