JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script>

JavaScript

// Library code
window.MyLib = {
    getIndicesFromThis: function(num){
        return this[num];
    }
};


!function() {
    // Application code

    var idcs = [1, 2, 4];
    var otherArray = ["", "These", "are", "not", "selected"];

    var vals = _.map(idcs, 
                     MyLib.getIndicesFromThis, 
                     otherArray);
    
    document.body.innerHTML = 
        "<pre>" + vals.join(" "); + "</pre>";
}();