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 Elena_Korljukova
import assert from "assert";
var correctSentence = text => text[0].toUpperCase() + text.slice(1).replace('.','') + '.'
console.log('Example:');
console.log(correctSentence('greetings, friends'));
// These "asserts" are used for self-checking
assert.equal(correctSentence('greetings, friends'), 'Greetings, friends.');
assert.equal(correctSentence('Greetings, friends'), 'Greetings, friends.');
assert.equal(correctSentence('Greetings, friends.'), 'Greetings, friends.');
console.log("Coding complete? Click 'Check' to earn cool rewards!");
June 10, 2020
Comments: