refactor javascript
refactor javascript

make code DRY by abstracting into different functions that can be reused

viparthasarathy/budget-management-system,viparthasarathy/budget-management-system,viparthasarathy/budget-management-system