Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

return longest string from array

arr.reduce((a, b)=> a.length > b.length ? a : b);
 
PREVIOUS NEXT
Tagged: #return #longest #string #array
ADD COMMENT
Topic
Name
9+6 =