learning how to javascript, albeit slowly