I put the string into the array and finally do the de-repetition operation, and the result is not correct?

the areas I got is a string, and then I put them into the array, and at last I do the deduplication operation, and the result is incorrect. How to modify the code to get [4662d4663]

areas += choiceID[0].areas[i].id + ",";
console.log("areas is:", areas) // areas is: 4662,4663,4662,4663,
var arrAreas = []
arrAreas.push(areas)
console.log(arrAreas) // ["4662,4663,4662,4663,"]
var newAreas = [...new Set(arrAreas)]
console.log(newAreas) // ["4662,4663,4662,4663,"]
Mar.28,2021


["4662", "4663", "4662", "4663"]   ["4662,4663,4662,4663"]
var areas = '4662,4663,4662,4663'
var arrAreas = areas.split(',')
console.log(arrAreas)
var newAreas = [...new Set(arrAreas)]
console.log(newAreas)

arrAreas.push (areas)
change it to
[] .push.apply (arrAreas,areas)
try


is there a whole string in your array? Then how to weigh it.
just separate

Menu