Contact: aviboots(AT)netvision.net.il
41,381 questions
53,927 answers
573 users
const arr2d = [ [ 5, 6, 1, 1, 1 ], [ 3, 8, 0, 2, 2 ], [ 9, 2, 7, 3, 3 ] ]; let arr = arr2d.flat(); arr.sort(); arr = [...new Set(arr)]; arr.forEach(n => { process.stdout.write(n + "\t"); }); /* run 0 1 2 3 5 6 7 8 9 */