cara mengonversi case string ke kalimat di javascript
const sentenceCase = () => {
function firstLetterUpper(string) {
var newString = string
.toLowerCase()
.replace(/(^\s*\w|[\.\!\?]\s*\w)/g, function(c) {
return c.toUpperCase();
});
return newString;
}
function convertToSentenceCase(string) {
var newText = firstLetterUpper(string);
return newText
}
convertToSentenceCase();
};
mrmalik610