Approve Object.entries() and Object.values() for use in Catapult
Approve Object.entries() and Object.values() for use in Catapult

Even though both are marked as "experimental" by MDN and are slated for
ES8 (Ecmascript 2017), both have two stable implementations
(Chrome 51, Firefox 47), making it very likely that their final form
will look like their current one.

These should allow us to use more idiomatic iteration techniques for
objects.

tr.b.iterItems(myDict, (key, value) => {
  window.alert(`${key}: ${value}`);
});

will become:

for (var [key, value] of Object.entries(myDict)) {
  window.alert(`${key}: ${value}`);
}

This new syntax allows for use of `break` (impossible before) and
the more natural `continue` instead of `return`.

I'll leave this replacement for future CLs.

Review-Url: https://codereview.chromium.org/2535353002

catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult-csm,catapult-project/catapult,catapult-project/catapult-csm,catapult-project/catapult,catapult-project/catapult,sahiljain/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-project/catapult,sahiljain/catapult,catapult-project/catapult-csm,benschmaus/catapult,sahiljain/catapult,benschmaus/catapult,catapult-project/catapult-csm,catapult-project/catapult,benschmaus/catapult,benschmaus/catapult,benschmaus/catapult,benschmaus/catapult,sahiljain/catapult,sahiljain/catapult,sahiljain/catapult