Adding a Layer Comp

This is probably a pretty simple question for some. I am trying to add a new LayerComp to Photoshop using UXP the Code I tried is:
CompList.add(“CompName”, “comment”, true, false); but this does not work, What would be the correct syntax to add a LayerComp to the LayerComps collection with a name and visibility set to true?

Thanks
Bill

To clarify the question above, I am trying to rewrite some of my extend script scripts to use UXP. The code I am working on now is to add a new layerComp with a specific name. What I do before this is to search through the layerComps collection to see if it already exists if it does I want to delete that layerComp and replace with a new layerComp with the same name. I also noticed there does not seem to be a remove function to remove just one layerComp for the collection, is this possible?