.every (without re-use .reduce)

PHOTO EMBED

Thu May 27 2021 04:00:01 GMT+0000 (Coordinated Universal Time)

Saved by @ejiwen #javascript

var test = true;
    if (iterator === undefined) {
      for (var key in collection) {
        if (! collection[key]) {
          return false;
        }
      }
    } else {
      for (var key in collection) {
        if (! iterator(collection[key]) ) {
          return false;
        }
      }
    }
    return test;
content_copyCOPY