const strings = ["Hello", "world", "from", "Underscore.js"]; const lengths = _.map(strings, str => str.length); console.log(lengths); // [5, 5, 4, 14]
const numbers = [1, 2, 3, 4, 5, 6]; const evens = _.filter(numbers, num => num % 2 === 0); console.log(evens); // [2, 4, 6]Package Library: Underscore.js.