Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Easy Way to Check if 2 Arrays are Equal in JavaScript

const d = [1,2,4,5,6];
const c = [1,2,4,5,6];

if (JSON.stringify(d) === JSON.stringify(c)) console.log('Equal!');
Source by indepthjavascript.dev #
 
PREVIOUS NEXT
Tagged: #Easy #Way #Check #Arrays #Equal #JavaScript
ADD COMMENT
Topic
Name
2+6 =