When clicking Add to List, the web browser reports this error:
Originally Posted by minusten
Uncaught ReferenceError: val is not defined - test.html:58
So, this seems to be wrong:
Instead, you need to give the function the value from the input field, so instead of val you need to use this.form.elements.name.value instead, resulting in:
Then you get another error, which is good news. It means the first error is fixed. Progress!
The error is:
Uncaught ReferenceError: array is not defined - test.html:21
which is this line:
array is not used anywhere else in the code. Instead, I see that numbers is used.
string += array[i] +"\n";
That means that array[i] should instead be numbers[i]
string += numbers[i] +"\n";
Then you have to work out why the sum section is not being updated.