I recently had a technical job interview. the code challenge i was asked to solve was given 3 arrays of numbers. goal was to remove all dups and negative nums i was able to remove dups but not duplicates, so far i have the following code. what am i missing?
let array1=[10, 200, 10, 200, 100, 100, 200, 200, 200, 200, -99, -6, 0, -859]
let array2 = [100, 200, 100, 200, 689, 689, 200, 400, 210, 200, -58, 200, -305, -6, 0, -859]
let array3 =[100, 200, 100, 200, 689, 689, 200, 400, 210, 400, -6, 200, -305, -6, 0, -859]
const arrays = {
array1,array2,array3
}
let nodups=Array.from(new Set(array1.concat(array2,array3)))
console.log(nodups);
After getting a duplicate free array, you need to filter the array for only positive values.