Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js compare values of two arrays

const a = ['Left', 'Right'];
const b = ['Right', 'Left'];

//	true if a and b contain the same values
//	false otherwise
const c = a.sort().join(',') === b.sort().join(',');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #compare #values #arrays
ADD COMMENT
Topic
Name
7+3 =