pass array of strings to match in str.replace code example
Example 1: pass array of strings to match in str.replace
typeof yourVariable === 'object' && yourVariable !== null
Example 2: pass array of strings to match in str.replace
const name = 'flavio'
const nameCapitalized = name.charAt(0).toUpperCase() + name.slice(1)