Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if array has same values javascript

const allEqual = arr => arr.every(v => v === arr[0]);
allEqual([1,1,1,1]);  // true
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #array #values #javascript
ADD COMMENT
Topic
Name
7+5 =