Javascript String pluralize(count)

Description

Javascript String pluralize(count)



String.prototype.pluralize = function(count) {
  if (count === 1) {
    return this;//  w  w w  .j  a v  a2  s  .  com
  } else {
    return this + "s";
  }
};



PreviousNext

Related