budget.js
// adds the income to the Incomes column

adds the income to the Incomes column
adds the income to the Incomes column
function addIncomeToTable() {
           var table = document.getElementById("incomeTable");
           var row = table.insertRow(index_income);
           var cell1 = row.insertCell(0);
           var cell2 = row.insertCell(1);
           var cell3 = row.insertCell(2);
           cell1.innerHTML = name_incomes[name_incomes.length - 1];
           cell2.innerHTML = sum_incomes[sum_incomes.length - 1];
           cell3.innerHTML = '<button onclick="removeItemIncome('+String(index_income)+')">X</button>';
           index_income += 1;
       }
function addIncomeToTable ( ) { var table = document . getElementById ( "incomeTable" ) ; var row = table . insertRow ( index_income ) ; var cell1 = row . insertCell ( 0 ) ; var cell2 = row . insertCell ( 1 ) ; var cell3 = row . insertCell ( 2 ) ; cell1 . innerHTML = name_incomes [ name_incomes . length - 1 ] ; cell2 . innerHTML = sum_incomes [ sum_incomes . length - 1 ] ; cell3 . innerHTML = '<button onclick="removeItemIncome(' + String ( index_income ) + ')">X</button>' ; index_income += 1 ; }
adds the income to the Incomes column
adds the income to the Incomes column