replaceItem

fun replaceItem(newItem: String, index: Int): String(source)

The replaceItem() method of the SVGStringList interface replaces an existing item in the list with a new item. The inserted item is the item itself and not a copy.

MDN Reference