These are the simple Javascript programs used in class. If you read them and (much better) play with variations, it will help you to figure out what's going on in programming, and the two Javascript labs ought to be easier too.
I haven't spent a lot of time on these, so there may be bugs and/or features, so if something seems really wrong, let me know. Thanks.
add2.html: add two numbers
addup.html: add up numbers until 0
area.html: computes area of circle from radius
areafcn.html: computes area of circle with function
firstname.html: computes first name alphabetically
max.html: find maximum numeric value
mult.html: multiply two numbers
ring.html: computes area of ring with function
sign.html: computes sign of number
sort.html: sort a set of names
while.html: computes i, i**2 in a while loop
for.html: foxtrot for loop