edit post 1 - learning javascript properly pt 1