Sun Oct 18 12:28:43 EDT 2009

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 will 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

name2.html: concatenate two names

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

loop.html: infinite loop: careful!

for.html: Foxtrot for loop