return radio button value code example
Example 1: get radio button value javascript
document.querySelector('input[name="rate"]:checked').value;
Example 2: radio input value
<input type="radio" name="test" id="test" value="this is the value">
document.querySelector('input[name="rate"]:checked').value;
<input type="radio" name="test" id="test" value="this is the value">