Skip to content

Commit

Permalink
new branch
Browse files Browse the repository at this point in the history
  • Loading branch information
khush2706 committed Nov 1, 2021
1 parent 13759cf commit ae75477
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions csv2json.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ fs.createReadStream('csv/data.csv')

//giving each person a rank according to the number of labs completed
for(let i = 1; i < results.length; i++){


if(results[i].totalLabs === results[i-1].totalLabs){
results[i].rank = rank //if the no of labs are same, give same rank
}
Expand All @@ -46,3 +48,7 @@ fs.createReadStream('csv/data.csv')
);
});





0 comments on commit ae75477

Please sign in to comment.