Javascript Array sumItUp()

Description

Javascript Array sumItUp()


// http://www.codewars.com/kata/547fb94931cce5f5de00024f/train/javascript

Array.prototype.sumItUp = function(){
  return this.reduce(function(prev, curr){return prev + curr});
}



PreviousNext

Related