What is your hint or solution suggestion?
It’s easier to replace the first comma in a string than the last comma in a string.
Solution 1
function quibble(words) {
var words2 = words.join()
var words3 = [...words2].reverse().join('');
var res = words3.replace(",", " dna ");
var words4 = [...res].reverse().join('');
return '{'+words4+'}';
}
Challenge: Comma quibbling
Link to the challenge: