Pase el conjunto de cuerdas para que coincida en str.replace
const name = 'flavio'
const nameCapitalized = name.charAt(0).toUpperCase() + name.slice(1)
Anxious Anteater
const name = 'flavio'
const nameCapitalized = name.charAt(0).toUpperCase() + name.slice(1)
typeof yourVariable === 'object' && yourVariable !== null