Sun Oct 21 17:11:50 EDT 2018

These are the simple Javascript programs used in class, plus a few others. 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. If something seems really wrong, let me know. Thanks.

add2.html: add two numbers

add2f.html: add two floating point 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

name.html: echo a name

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

mult.html: multiplication operation