Examples of refactoring to functional programming in JavaScript