Assignment1 converted for js

Assignment converted to JavaScript for web viewing