var r = document.getElementById("r"); r.innerHTML = _.lastIndexOf(['a', 'b', 'c', 'b'], 'b'); // => 3