Javascript String capitalizeAll()

Description

Javascript String capitalizeAll()

String.prototype.capitalizeAll = function () {
  return this.split(' ').map(word => word.capitalize()).join(' ')
}



PreviousNext

Related