examples/javascript/find_first.js

let animals = ['snake', 'camel', 'etruscan shrew', 'ant', 'hippopotamus', 'giraffe'];
let first = animals.find(a => a.length > 5);
console.log(first);