Nodejs String Capitalize capitalizeFirstLetter()

Here you can find the source of capitalizeFirstLetter()

Method Source Code

'use strict';/*from   w  ww .  jav  a2  s.c  om*/
module.exports = function () {

};
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);
    };
    
  2. capitalizeFirst()
    String.prototype.capitalizeFirst = function(){
        return this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();
    };
    
  3. capitalizeFirst()
    String.prototype.capitalizeFirst = function()
      return ( this.charAt(0).toUpperCase() + this.slice(1) );
    };
    
  4. capitalizeFirstLetter()
    String.prototype.capitalizeFirstLetter = function() {
        return this.charAt(0).toUpperCase() + this.slice(1);
    
  5. capitalizeFirstLetter()
    'use strict';
    String.prototype.capitalizeFirstLetter = function() {
        return this.charAt(0).toUpperCase() + this.slice(1);
    
  6. capitalizeFirstLetter()
    "use strict";
    String.prototype.capitalizeFirstLetter = function () {
        return this.charAt(0).toUpperCase() + this.slice(1);
    };
    
  7. capitalizeFirstLetter()
    String.prototype.capitalizeFirstLetter = function () {
        return this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();
    };
    
  8. capitalizeFirstLetter()
    var log = function(log){
        console.log(log);
    };
    String.prototype.capitalizeFirstLetter = function() {
            return this.charAt(0).toUpperCase() + this.slice(1);
    };
    
  9. 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)];
    };