uniteUnique function

function uniteUnique(...arr) {
  console.log([...new Set(arr.flat())])
  console.log(arr);
 // const myArr = arr[0].concat(arr[1]).concat(arr[2]).concat(arr[3]);
  const myArr = [...arr]
  console.log(myArr)
  const newArr = [];
  console.log(arr[0])
  myArr.map((item)=> {
    item.forEach((each)=>{
      arr.map((every)=>{
        if (every.includes(each)) {
          !newArr.includes(each) ? newArr.push(each): 0;
        }
      })
    })
  })
return newArr
}

Did you have a question? When you are working on the challenges there should be a get help button. If you click on that then it will help you create your own post in a area that matches the challenge, and it will include your code so that people can help you better. Also, when you explain your problem more, and what issues you are facing then we can hep you understand on how to fix your issues

As above :point_up:, at very least try to describe the problem you’re having here @OPENJI

As it is, I’ve edited the title and moved it to the JavaScript topic

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.