'How can get totalBalanceAmount value from getSavingsInput() and put into (HERE)?

How can get totalBalanceAmount value from getSavingsInput() that i can put into (HERE)?

function getSavingsInput() {
    let totalBalance = document.getElementById('balance')
    let totalBalanceAmount = parseFloat(totalBalance.value)
    return totalBalanceAmount;
}

document.getElementById('Savings').addEventListener('click',function() {
    let savingInput = getInput('savigns-input') // this is the another function
    let savingsInputAmount = parseFloat(savingInput)
    const savignsAmount = (HERE) % savingsInputAmount;
    const savedAmount =  document.getElementById('saved-amount')
    savedAmount.innerText = savignsAmount;
})


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source