Given a map and a number (n), add n to the first 2 key/value pairs in the map.
// input:
const m = new Map([['apples', 1], ['bananas', 2], ['carrots', 3], ['pears', 4], ['grapes', 5]]), n = 3
// output:
{ "apples": 4, "bananas": 5, "carrots": 3, "pears": 4, "grapes": 5 }
(Ctrl + ')
Loading...
/* output */
Next(Ctrl + y)