export function areEqual(first, second) { if (first.length !== second.length) { return false; } for (let i = 0; i < first.length; i++) { if (!second.includes(first[i])) { return false; } } return true; } export function removeItem(array, item) { const index = array.indexOf(item); if (index > -1) { array.splice(index, 1); } }