Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if all array elements are equal


function myFunction( arr ) {
  return new Set(arr).size === 1
}
 
PREVIOUS NEXT
Tagged: #check #array #elements #equal
ADD COMMENT
Topic
Name
3+6 =