Quiz application. How to learn javascript properly