Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const convertString = (inputString) => {
- const words = inputString.split("_");
- const capitalizedWords = words.map(
- (word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase(),
- );
- const result = capitalizedWords.join(" ");
- return result;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement