Skip to content

Commit 412d168

Browse files
authored
Modify createLookup to accept countryCurrencyPairs
1 parent 3651346 commit 412d168

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎Sprint-2/implement/lookup.js‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
function createLookup() {
2-
// implementation here
1+
function createLookup(countryCurrencyPairs) {
2+
const lookup = {};
3+
4+
for (const [countryCode, currencyCode] of countryCurrencyPairs) {
5+
lookup[countryCode] = currencyCode;
6+
}
7+
8+
return lookup;
39
}
410

511
module.exports = createLookup;

0 commit comments

Comments
 (0)