How to traverse column wise

Hello
I want to traverse columns wise. How can I do that.
Example
Empid. Emasalary

  1.      100000
    
  2.      200000
    
  3.      300000
    

Sum of salary = 600000

How can I do this in JavaScript without using groupby

Hi Shubham,

if (getProcessCount(“r”) == 1) {
var lastCredit = 0;
}
lastCredit = lastCredit + credit;

Relace credit with your column name.