Code I have written while learning Javascript