What are the differences between pure and impure functions?
Some of the major differences between pure and impure function are as below,
| Pure function | Impure function |
| ----------------------------------- | ---------------------------------------------------------------------- |
| It has no side effects | It causes side effects |
| It is always return the same result | It returns different result on each call |
| Easy to read and debug | Difficult to read and debug because they are affected by external code |