Intern — Middle
Function to compare two arrays of numbers regardless of order
livecode
Task condition
You need to implement a function that takes two arrays of integers and returns true if both arrays contain the same elements, regardless of their order, and false otherwise.
// isSimilar([0,1,2], [2,1,0]) === true
// isSimilar([0,1], [2,1,0]) === false
// isSimilar([0,5,1], [0,1,5]) === true
isSimilar(arr1, arr2)
function isSimilar(arr1, arr2) {
}