Make JS mo' fun by writing less of it via functional programming