Imperative code describes how to do things. Declarative code describes what we are doing. Because of this, declarative code is easier to understand and modify.
How exactly does one do functional programming?
Avoid
Favor
mutable state
function parameters and immutable data
iterative steps
transforming data
loop statements
recursion or higher order functions
intertwined data and behavior
separated data and behavior