Javascript – Pure vs Impure functions

I have gone through the definitions of the two like:

Pure functions are ones that do not attempt to change their inputs, and always return the same result for the same inputs.


function sum(a, b) {
  return a + b;

And Impure function is one that changes its own input.


function withdraw(account, amount) { -= amount;

Definitions and Code snippets taken from ReactJs official docs.

Now, can somebody tell me, how can I make some mistakes in React/Redux, to use impure functions where pure functions are required.

Source: ReactJs