Skip to content

Instantly share code, notes, and snippets.

function firstLetter(name) {
if (typeof(name) !== "string" || name.length < 3) return "Incorrect Input"
const removedLetter = name.slice(0, -1)
const result = name[0].toUpperCase() + removedLetter.slice(1)
return result
}
console.log('firstLetter', firstLetter('Adedoyin'))