I have an assignment due on Tuesday and I'm having a few problems with arrays. First I can't seem to get my array to display vertically, it just comes out like 12,34,67,etc. also I'm having difficulty getting the highest and lowest number from the array. My program is supposed to get temperatures from the user and calculate the average, sum, high and low and list all the input. This is what i have so far

[code]

<script language="JavaScript">

var tempInputArray=new Array();


function addToStats() {

var tempInput=document.tempStats.tempInput.value;

tempInputArray.push(tempInput);

var sum=parseFloat(0);

for(i=parseFloat(0); i<tempInputArray.length; i++)
sum+=parseFloat(tempInputArray[i]);

var average=sum/tempInputArray.length;

var max=tempInputArray[0];
for(i=parseInt(1); i<tempInputArray.length; i++)
if(tempInputArray[i]>max {
max=tempInputArray[i];
}


output=(tempInputArray + "<br>");
document.getElementById("output").innerHTML=output

output1=("The # of entries is " + tempInputArray.length + " and the sum is " + sum + "<br>" + "The average is " + average + "<br>" + "The largest is " + max);
document.getElementById("output1").innerHTML=outpu t1
}

function clearForm() {
output="";
document.getElementById("output").innerHTML=output ;

output1="";
document.getElementById("output1").innerHTML=outpu t1;

document.tempStats.tempInput.value="";
}
</script>

[code]

Any help would be greatly appreciated!

Thanks,
-Andy