capitalize first letter es6 code example
Example 1: how to make 1st letter capital in ejs
yourstring.replace(/\w/, c => c.toUpperCase())
Example 2: capitalize first carater js
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1)
}