Category: Database, Data

Pure functions are often hyped up in the JavaScript world, probably because of the abundance of stateful front end applications. While pure functions have their downsides (i.e. inconvenience, potentially large argument lists), they should be used as much as reasonably possible.

According to Wikipedia, a Pure function has the following properties: Which means that as a developer I know two important things: Because of these properties, pure functions keep applications simple. As we know, simple applications tend to be faster, are easier to test and debug, and are less error prone in general.

That makes this a bad test, and we wrote the bad test because we have an impure function.

Related Articles