Underscore.js Collections: Find

HTML

<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script>
<a target="parent" href="http://underscorejs.org/#find">Learn More</a>

JavaScript

var even = _.find([1, 2, 3, 4, 5, 6], 
function(num){ 
return num == 1; 
});

console.log(even);
//2 
//Because 2 is the first number to match