One terms you will hear over and over and over when you start getting into functional programming is the term pure functions.
But they can be a little bit difficult to understand, or difficult to find a clear description.
A pure function is a function that returns a result based on it’s inputs and the inputs alone. The result should be deterministic. This have some consequences for how most programmers write their code. Because a pure function never change anything outside itself.
This mean that it does not use variables that are not defined inside it or are parameters, and it does not change anything outside itself.
If it prints: not pure. If it writes to a file: not pure. If it alters global state: not pure.
I think that using pure functions as much as possible is a good idea, because pure functions are often less buggy and easier to maintain. And it forces you to limit unpure functions to a minimum and really thinking before you deal with unpurity.
Personally I prefer languages like Clojure that are built with this in mind.