Skip to content

Commit 37a2b47

Browse files
authored
Implement createLookup function in lookup.js
Implemented the createLookup function to build a lookup object from country-currency pairs.
1 parent 44fd831 commit 37a2b47

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎Sprint-2/implement/lookup.js‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
function createLookup() {
2-
// implementation here
2+
const lookup = {};
3+
4+
countryCurrencyPairs.forEach(pair => {
5+
lookup[pair[0]] = pair[1];
6+
});
7+
8+
return lookup;
39
}
410

511
module.exports = createLookup;

0 commit comments

Comments
 (0)