lib/subject/eachSubject.js
function EachSubject(subject, elements, elementName, opt_noIndex) {
  ProxyBase.call(this);
  this.elementSubjects = [];
  for (var i = 0; i < elements.length; ++i) {
    var es = subjectFactory.newSubject(subject.failureStrategy, elements[i]);
    es.named(elementName + (opt_noIndex ? '' : (' ' + i)) + ' of ' + subject.describe());
    es.failureMessage = subject.failureMessage;
    this.elementSubjects.push(es);
  }
}
function EachSubject(subject, elements, elementName, opt_noIndex) {
  ProxyBase.call(this);
  this.elementSubjects = [];
  for (var i = 0; i < elements.length; ++i) {
    var es = subjectFactory.newSubject(subject.failureStrategy, elements[i]);
    es.named(elementName + (opt_noIndex ? '' : (' ' + i)) + ' of ' + subject.describe());
    es.failureMessage = subject.failureMessage;
    this.elementSubjects.push(es);
  }
}
A subject which executes its assertions on each element of an iterable.
@param {Subject} The subject responsible for creating this.
@param {Array} elements List of elements to test.
@param {string} elementName What noun to use when referring to elements ('item', 'child', etc.)
@param {bool} opt_noIndex If true, don't include the element index in the failure message.
@constructor
@extends ProxyBase