Just show the code:

```js
function show() {
  console.log(document.querySelector('input[type=radio]').value) // 'on'
}
```

```html
<input type="radio">

<button onclick="show()">Show value</button>
```