I'm trying to turn a JavaScript array into a comma-separated list. I have an array like this:


<script>
const myArray = ["apple", "banana", "cherry", "date"];
</script>

And I want to convert it into a string like this:

"apple, banana, cherry, date"

I've been trying different approaches, but I'm not sure what's the easiest way to do it. Can someone help me out with this?