On my current project we’ve been working heavily with backbone.js and underscore.js. We were recently bit by a bug where all of our automated tests in Firefox and our manual tests in Firefox and Chrome passed.
We discovered the problem was a forgotten call to underscore the array returned by underscore’s
# broken _(candies).filter((candy) -> candy.isChocalate? ).map (candy) -> candy.yummy() # plays well with IE8 _(_(candies).filter((candy) -> candy.isChocalate? )).map (candy) -> candy.yummy() # allows for more method chaining _(candies).chain().filter((candy) -> candy.isChocalate? ).map((candy) -> candy.yummy() ).value()
If IE 8 is a target browser for your project, don’t forget to bring a
map (from underscore.js).