Sure, I think this should do the trick:
<div id="corrAns" style="display:none">{{cloze:Text}}</div>
<script>
goodAns = document.querySelector("#typeans > span.typeGood:only-child");
if (goodAns) {
goodAns.innerText = [...document.getElementById('corrAns').querySelectorAll('.cloze')].map(L=>L.innerText).join(", ");
}
</script>