ReplaceAll()? Am I doing something wrong here?

// Write function below

const groceries = items =>{

let list =;

items.forEach(object =>{

list.push(object.item);

});

list.splice(list.length-1,0,‘and’);

return (list.toString()).replaceAll(","," ");

};

groceries( [{item: ‘Carrots’}, {item: ‘Hummus’}, {item: ‘Pesto’}, {item: ‘Rigatoni’}] );

this throws me a type error of the method replaceAll not existing? even though I’ve checked MDN countless times and I’m honestly at a loss here, double checked that I am indeed working with a string and there’s no oversight I might have missed, checked the regular replace method and it seems to work just replaceAll doesn’t, any help would be appreciated as to why this isn’t working.
checking the codebyte thing:

// Write function below const groceries = items =>{ let list =[]; items.forEach(object =>{ list.push(object.item); }); list.splice(list.length-1,0,'and'); return (list.toString()).replaceAll(","," "); }; console.log(groceries( [{item: 'Carrots'}, {item: 'Hummus'}, {item: 'Pesto'}, {item: 'Rigatoni'}] ));

it seems to be working in the codebytes here but not in the assignment itself