Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

.every() Accepts a test function and returns a boolean if all the elements of the array pass the test.

["gonna", "give", "you"].every((element) => element.startsWith("g")) // false

["apple", "android", "aluminium"].every((element) => element.startsWith("a")) // true
Source by devdojo.com #
 
PREVIOUS NEXT
Tagged: #Accepts #test #function #returns #boolean #elements #array #pass
ADD COMMENT
Topic
Name
3+1 =