0 points

Compare two arrays regardless of the order


dashboard

Mon Aug 03 2020 06:46:19 GMT+0000 (UTC)

Posted by @wireshark #javascript

// `a` and `b` are arrays
const isEqual = (a, b) => JSON.stringify(a.sort()) === JSON.stringify(b.sort());
content_copy Copy

Office code