setItem

fun setItem(key: String, value: String)(source)

The setItem() method of the Storage interface, when passed a key name and value, will add that key to the given Storage object, or update that key's value if it already exists.

MDN Reference