I am currently working on a series of JavaScript tests available at js-assessment
One of the tasks states:
it("you should be able to find all occurrences of an item in an array", function() {
var result = answers.findAllOccurrences('abcdefabc'.split(''), 'a');
expect(result.join(' ')).to.be('0 6');
});
I am confused about the '0 6' result provided. The task requires finding occurrences of 'a', but there are only two 'a's in that array.