The following is a collection of basic templates for certain common tasks in JS