I'm not sure if I did this right, as I am pretty new to JavaScript.
But I want to lowercase any random string text and then capitalize the first letter of each word in that text.
<script>
function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
function lowerCase(string) {
return string.toLowerCase();
}
</script>