the document.write does not prints you selected Tasmania
<html>
<head>
<title>Javascript Counts</title>
<script type="text/javascript">
function vals()
{
var radios = document.getElementsByName("rbnNumber");
for (var i = 0; i < radios.length; i++) {
var r = radios[i];
if (r.value == "4" && r.checked) {
document.write("You selected Tasmania")
}
</script>
</head>
<body>
<table align = "center">
<tr>
<td>
<a href = "some.html">Previous
</td>
<td>
What is the Capital of France
</td>
<td>
<a href = "some.html">Next
</td>
</tr>
</table>
<table align = "center">
<tr>
<td>
<input type="radio" name="rbnNumber" value="4" />Tasmania<br/>
</td>
</tr>
<tr>
<td>
<input type="radio" name="rbnNumber" value="Nicaragua:which is not the correct answer: Try Again" /> Nicaragua<br/>
</td>
</tr>
<tr>
<td>
<input type="radio" name="rbnNumber" value="Tunisia:which is not the correct answer: Try Again" /> Tunisia<br/>
</td>
</tr>
<tr>
<td>
<input type="radio" name="rbnNumber" value="Algeria:which is not the correct answer: Try Again" /> Algeria<br/>
</td>
</tr>
</table>
<table align = "center">
<tr>
<td align="center">
<input type="button" id="btnGetValue" onclick="vals()" Value="Get Value" />
<p></p>
</td>
</tr>
<tr>
</tr>
</table>
</body>
</html>