Practice code for javascript applications