Question: Hi i am new to javascript and having some trouble. 

I need my function to take the user input "recserv" and multiply it by the value of the selected radio button, as well as update if the value is changed or the radio button is changed.

Changing the radio buttons seems to work, but I get an error when the "recserv" value is changed.

Thank you for any help! 

```
<script>
function yeartot(service) {
    var recserv = parseFloat(document.getElementById('recserv').value);
    document.getElementById("result").value = service*recserv;
}
</script>
<body>

<p>Select the frequency</p>
  <input onclick="yeartot(this.value)" type="radio" name="service" value="11">Monthly<br>
  <input onclick="yeartot(this.value)" type="radio" name="service" value="6" checked> Bi-Monthly<br><br>

 Recurring Service Amount <input onchange="yeartot()" id="recserv" value=0><br/><br/>

  Total for year <input type="text" id="result">

```

Answer: 
```js
const setup = () => {
 const serviceInputs = document.querySelectorAll('input[name="service"]');
  serviceInputs.forEach(e => e.addEventListener('click', yeartot));
 const recserv = document.querySelector('#recserv');
  recserv.addEventListener('change', yeartot);

}

const yeartot = (service) => {
    const checkedInput = document.querySelector('input:checked');
    const recserv = document.querySelector('#recserv');

    const serviceNumber = parseFloat(checkedInput.value, 10);
    const recservNumber = parseFloat(recserv.value, 10);

    const result = document.querySelector('#result');
    result.value = serviceNumber * recservNumber;
}

//load
window.addEventListener('load', setup);
```

```html
<body>
  <p>Select the frequency</p>
  <input type="radio" name="service" value="11">Monthly<br>
  <input type="radio" name="service" value="6" checked> Bi-Monthly<br><br>

 Recurring Service Amount <input id="recserv" value="0"><br/><br/>

  Total for year <input type="text" id="result">

</body>
```
yeartot method has a parameter and when you use yeartot() in onchange property of input cause undefined value in service parameter.undefined value is not a number and take error.