Pure Functions in JavaScript