JSFiddle - React, Tailwind, and code Playground

JavaScript

var Under30 = Backbone.Collection.extend({
    initialize: function(models, options) {
        for(var i = models.length - 1; i > 0; i-- ){
            if (models[i].age > 30){
                models.splice(i,1);
            }
        }
    }
});

var collection = new Under30([{name:'xy',age:24},{name:'y',age:35}, {name:'z',age:21}])
console.log(collection.models.length);