How does my array look so far?


I think so
what i was supposed to do was
insert a script element that contains the function

then add commands to the function
such as
1 declare variable named total, set intial value to 0
2 create a FOR LOOP that loops all values in amount array.
add current value of array item to value of total variable
3 when completed return value of total variable

This is what I came up with
tell me if this makes sense

title>The Lighthouse</title>
<link href="lhouse.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="list.js"></script>

<script type="text/javascript">

function amountTotal() {
for(var i=0; i<amountTotal.length; i++){

return total;
Does this seem right or is my format all wrong?
if so what should i have instead?