Nodejs String Capitalize capitalizeFirstLetter()

Here you can find the source of capitalizeFirstLetter()

Method Source Code

"use strict";//from   www .jav  a  2s  . com

String.prototype.capitalizeFirstLetter = function () {
    return this.charAt(0).toUpperCase() + this.slice(1);
};

Related

  1. capitalizeFirst()
    String.prototype.capitalizeFirst = function(){
        return this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();
    };
    
  2. capitalizeFirst()
    String.prototype.capitalizeFirst = function()
      return ( this.charAt(0).toUpperCase() + this.slice(1) );
    };
    
  3. capitalizeFirstLetter()
    String.prototype.capitalizeFirstLetter = function() {
        return this.charAt(0).toUpperCase() + this.slice(1);
    
  4. capitalizeFirstLetter()
    'use strict';
    String.prototype.capitalizeFirstLetter = function() {
        return this.charAt(0).toUpperCase() + this.slice(1);
    
  5. capitalizeFirstLetter()
    'use strict';
    module.exports = function () {
    };
    String.prototype.capitalizeFirstLetter = function() {
      return this.charAt(0).toUpperCase() + this.slice(1);
    
  6. capitalizeFirstLetter()
    String.prototype.capitalizeFirstLetter = function () {
        return this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();
    };
    
  7. capitalizeFirstLetter()
    var log = function(log){
        console.log(log);
    };
    String.prototype.capitalizeFirstLetter = function() {
            return this.charAt(0).toUpperCase() + this.slice(1);
    };
    
  8. capitalizeFirstLetter()
    String.prototype.capitalizeFirstLetter = function() {
        return this.charAt(0).toUpperCase() + this.slice(1);
    };
    Array.prototype.randomElement = function () {
        return this[Math.floor(Math.random() * this.length)];
    };
    
  9. capitalizeFirstLetter()
    String.prototype.capitalizeFirstLetter = function(){
         return this[0].toUpperCase() + this.slice(1);