Implement the function capitalizeFirstWord(s).
It should accept a string, turn the first letter of its first word to uppercase and return the result.
This task is part of the Full-Stack JavaScript Course
If you have any issues with it, you can ask for community help below the post
Feel free to help others if you’ve already solved the task
functions.js
export const capitalizeFirstWord = (s) => {
return s;
}
solution.js
/**
* Implement the function capitalizeFirstWord(s).
*
* It should accept a string, turn the first letter of its first word to uppercase and return the result.
*
* */
import { capitalizeFirstWord } from './functions.js';
const s = 'london is the capital of Great Britain.'
console.log(capitalizeFirstWord(s));