get first or default javascript code example Example: javascript first or default names.find(x => x.length === 4)