Learing javascript for web application