diff --git a/index.js b/index.js index 0b1c8065b..93e9a61a9 100644 --- a/index.js +++ b/index.js @@ -12,5 +12,13 @@ const tutorials = [ ]; const titleCased = () => { - return tutorials + return tutorials.map(tutorial => toTitleCase(tutorial)); +} + + +const toTitleCase = (words) => { + return words + .split(' ') + .map(word => word.charAt(0).toUpperCase() + word.slice(1)) + .join(' '); }