MCPcopy Create free account
hub / github.com/GoogleChrome/samples / startsWithLetterA

Function startsWithLetterA

array-methods-es6/demo7.js:1–5  ·  view source on GitHub ↗
(element, index, array)

Source from the content-addressed store, hash-verified

1function startsWithLetterA(element, index, array) {
2 if (element.startsWith('a')) {
3 return element;
4 }
5}
6var cuteNames = ['jeff', 'marc', 'addy', 'francois'];
7
8cuteNames.find(startsWithLetterA); // "addy"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected