I tried it but my join() function doesn't even work. Not sure what the problem is. Maybe tomorrow I'll be smarter. Are all variables outside functions global in Javascript?


<script language="javascript">

var numbers = new Array();
var i = 0;

function max(var numList)
	var largest = Number.NEGATIVE_INFINITY;
	for (j=0; j < numList.length; j++)
		if (numList[j] > largest)
			largest = numList[j];

function join()
	numbers[i] = parseFloat(document.myForm.num1.value);



<form name="myForm">
<input type="text" size="3" name="num1" />
<input type="button" value="AddNum" onClick="join()">
<input type="button" value="Find Max" onClick="max(numbers)">