Side effects are mostly avoided in functional programming, which makes the effects of a program much easier to understand, and much easier to test. code example

Example: what is functional programming

By respecting these restrictions, 
FP aims to write code that is clearer to understand and more bug resistant. 
This is achieved by avoiding using flow-control statements 
(for, while, break, continue, goto) which make the code harder to follow. 
 requires us to 
write pure, deterministic 
functions which are less likely to be buggy.