1/** 2 * A specialized version of `_.sum` for arrays without support for iteratees. 3 * 4 * @private 5 * @param {Array} array The array to iterate over. 6 * @returns {number} Returns the sum. 7 */ 8function arraySum(array) { 9 var length = array.length, 10 result = 0; 11 12 while (length--) { 13 result += +array[length] || 0; 14 } 15 return result; 16} 17 18module.exports = arraySum; 19 20