I want to get the selected value from a group of radio buttons.
Here\'s my HTML:
You can use .find() to select checked element:
.find()
var radio = Array.from(document.querySelectorAll('#rate input')) var value = radio.length && radio.find(r => r.checked).value