Fix array reduce

See below - all works fine as far as I can tell.
Left the console.log in on purpose, but can remove if you prefer...