Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

compare between two arrays javascript

const equals = (a, b) => JSON.stringify(a) === JSON.stringify(b);
let arr1 = ['1','2'];
let arr2 = ['1','2'];
equals(arr1,arr2)//this return false , if not equal then its return false
Source by www.30secondsofcode.org #
 
PREVIOUS NEXT
Tagged: #compare #arrays #javascript
ADD COMMENT
Topic
Name
2+5 =