Javascript String insertCharAtIndeces(char, indices)

Description

Javascript String insertCharAtIndeces(char, indices)

String.prototype.insertCharAtIndeces = function(char, indices) {
  var that = this;
  indices.forEach(function(value) {
    that = that.insert(value, char); //w  ww .  ja  v  a  2 s.  c om
  });  
  return that;
};



PreviousNext

Related