javascript Compare two arrays regardless of order

JavaScript
const isEqual = (a, b) => JSON.stringify(a) === JSON.stringify(b);

// Examples
isEqual([1, 2, 3], [1, 2, 3]);      // true
isEqual([1, 2, 3], [1, '2', 3]);    // false
Source

Also in JavaScript: