JavaScript check the value of a radio code example
Example 1: get radio button value javascript
document.querySelector('input[name="rate"]:checked').value;
Example 2: radio button group get value javascript
$('input[name=gender]:checked').val();