index.js
function(diffArray) {
    for (var i=0, head=0, result=[], len=diffArray.length; i<len; i++) {
      head = head + diffArray[i];
      result.push(head);
    }
    return result;
  }
function(diffArray) {
    for (var i=0, head=0, result=[], len=diffArray.length; i<len; i++) {
      head = head + diffArray[i];
      result.push(head);
    }
    return result;
  }
function ( diffArray ) { for ( var i = 0 , head = 0 , result = [ ] , len = diffArray . length ; i < len ; i ++ ) { head = head + diffArray [ i ] ; result . push ( head ) ; } return result ; }
Converts an array of diffs to array of values
for example : [100, 1, 1, 1, 1, 1] => [100, 101, 102, 103, 104, 105]
@param {array<number>}
@return {array<number>}
Converts an array of diffs to array of values for example : [ 100 1 1 1 1 1 ] = > [ 100 101 102 103 104 105 ]