var array = string.split(',');
let numbers = [0, 1, 2, 3];
let numbersToString = numbers.toString();
console.log(numbersToString);
// output is "0,1,2,3"
var colors = ["red", "blue", "green"];
var colorsCSV = colors.join(","); //"red,blue,green"
const selectedPlaces=[
{ name: 'Stockholm', isChecked: true },
{ name: 'Dubai', isChecked: true },
{ name: 'San Francisco', isChecked: 'false' },
]
const tempSelectedPlace = selectedPlaces.filter(place => place.isChecked === true);
//[{ name: 'Stockholm', isChecked: true },{ name: 'Dubai', isChecked: true },]
const selectedPlace = tempSelectedPlace.map(place => place.name).join(', ')
console.log(selectedPlace)
//Stockholm,Dubai