From 272781da62dd9a9b310c9d34b0f5c9e615723aee Mon Sep 17 00:00:00 2001 From: Richard Morales Date: Tue, 12 Jan 2016 21:39:01 -0800 Subject: [PATCH] Exercise 18 possible bug. The answer shown returns an object to apply .map() to, which will not execute. I placed the two return statements for acc and curr inside an array. So it now is : return [acc] , return [curr]. Which map will then iterate on. Tried using the RxJS and underscore library with your current code, but neither would execute .map on an object. --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index e9700e2..71c4ad2 100644 --- a/index.html +++ b/index.html @@ -2090,10 +2090,10 @@

Exercise 18: Retrieve url of the largest boxart

return boxarts. reduce(function(acc,curr) { if (acc.width * acc.height > curr.width * curr.height) { - return acc; + return [acc]; } else { - return curr; + return [curr]; } }). map(function(boxart) {