'How can i add three input value?
function expenseAndBalance(expense) {
const input = document.getElementById(expense + '-input');
const inputValue = parseInt(input.value);
const inputTotalValue =
inputValue(food)+inputValue(rent)+inputValue(cloths) ;
}
expenseAndBalance('food'); // 50
expenseAndBalance('rent'); // 100
expenseAndBalance('cloths'); //100
I want to sum three input value in function , function already called from below. How can i add three input value?
Output will be 250
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
