Pure vs. Impure Functions

Understand the differences between pure and impure functions.

When we can’t predict the results of a function, the function is impure. But before we can devise a strategy to handle impure functions, we need to know how to identify them. In this lesson, we’ll learn all the differences between predictable pure functions and unpredictable impure functions. In this course, we’ve seen many examples that contain impure and pure functions, but we didn’t stop to understand their properties. Now, we’ll explore them and understand how to identify them by writing some examples.

Get hands-on with 1400+ tech skills courses.