JS Vérifiez si deux tableaux contiennent les mêmes valeurs

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(',');
Raul Talmacel