decapitalize
Decapitalizes the first letter of a string.
- Use array destructuring and
String.prototype.toLowerCase()to decapitalize first letter,...restto get array of characters after first letter and thenArray.prototype.join('')to make it a string again. - Omit the
upperRestargument to keep the rest of the string intact, or set it totrueto convert to uppercase.