kamii50,
function sameArrays(a, b){
const f = (a,b) => a - b;
return a.length === b.length && (
a = a.slice(0).sort(f),
b = b.slice(0).sort(f),
a.every((a,i) => a === b[i])
)
}
console.log(sameArrays([10, 3, 29, 15], [15, 10, 3, 29]))//true
console.log(sameArrays([12, 10, 3], [10, 3, 29, 15]))//false