Shorten your boilerplate JavaScript code