Apps Script: Return array items
Well...I think I'd better ask for some help on this one:
const name=“alain”; const arr=["[email protected]", "[email protected]", "[email protected] ", "[email protected]"];
All I want to do is: search for email addresses that start with
“alain” and pass that email address back to me as a variable, I It can be used in other functions.
Do you know how to implement it?
uj5u.com enthusiastic netizens replied:
const address=arr.find(element=> element. startsWith(name))