0 votes
in JavaScript by
What are the differences between pure and impure functions?

1 Answer

0 votes
by

Some of the major differences between pure and impure function are as below,

Pure functionImpure function
It has no side effectsIt causes side effects
It is always return the same resultIt returns different result on each call
Easy to read and debugDifficult to read and debug because they are affected by extenal code
...