Story Details

Polymorphism That Just Works by @airportyh

Posted By tutorialStash on Javascript

http://tobyho.com - Code JavaScript much? Have you ever complained about how the arguments object is not a real array? Ditto for NodeLists, right? Isn't it unsettling that if you care about compatibility with older browsers, you can't rely on useful array methods like map, filter, reduce, or even indexOf? Good thing we have underscore and lodash. If you are using a MVC framework that requires you to use their own collection class, it's yet another layer of translation and mental overhead: interacting with a Backbone.Collection or an Ember.Array requires talking to a different API vs a plain vanilla JavaScript array. But, you would think: an array is an array is an array, right? Why is this so hard?

Submit a Comment

Log in to comment or register here