Skip to content

Instantly share code, notes, and snippets.

const fs = require('fs');
const Papa = require('papaparse');
const _ = require('lodash');
const pay_all_proportionally = (startLoans, emi) => {
const loans = _.cloneDeep(startLoans);
let total_outstanding = _.sumBy(loans, 'outstanding');
let month = 0;
while (total_outstanding > 0) {
console.log(`month ${month} outstanding ${total_outstanding}`);