Javascript: How to use reduce?

Working with arrays on javascript, the reduce function has been really helpful.