We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 743e6b0 commit 46376f4Copy full SHA for 46376f4
reduce/core.js
@@ -50,14 +50,19 @@ function objectify (array) {
50
// your code here
51
//cartoonObject is our accumulator object, so also need {}
52
//reach row is the element being passed in which is an array
53
+ //console log to get the keys and values to populate our cartoonObject
54
+ //create cartoonObject
55
+ //return cartoonObject starting variable
56
return array.reduce(function(cartoonObject, row){
-
57
console.log('row ', row[0]);
- // console.log(newObject);
58
+ console.log('row2 ', row[1]);
59
+ cartoonObject[row[0]] = row[1];
60
+ console.log('cartoonObject ', cartoonObject);
61
62
console.log(cartoonObject);
63
return cartoonObject;
- }, {});
64
+ },
65
+ {});
66
}
67
68
objectify(input2);
0 commit comments