Mr_ZET,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<script>
var length = sumOfOddNums = sum = 0;
while (n = +prompt("Введите число")) {
length++;
n % 2 && (sumOfOddNums += n);
sum += n;
}
alert([length,sumOfOddNums,sum, sum/length])
</script>
</body>
</html>