Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
correct_sentence solution in Uncategorized category for Correct Sentence by Jon_Red
import assert from'assert';
function correctSentence(text:string):string{
text=text.trim();
return text[0].toUpperCase()+text.slice(1).replace('.','')+'.';
}
// self-checks
assert.equal(correctSentence('greetings, friends'),'Greetings, friends.');
assert.equal(correctSentence('Greetings, friends'),'Greetings, friends.');
assert.equal(correctSentence('Greetings, friends.'),'Greetings, friends.');
July 12, 2020
Comments: