LeewayHertz interview question

How does array reduce method works?