Code written for learning javascript.