JavaScript Como selecionar o botão de rádio

function check() {
  document.getElementById("red").checked = true;
}
Gadgetsan