setItem( key, value ) method

Sets the value associated with a specified key.

This replaces the key's previous value, if any.

Syntax

setItem( key, value )

Parameters

Name Type Description
key String String key corresponding to the value.
value String String value to store.

Example

// Create the SUP Storage
var store = new hwc.SUPStorage ("one");
store.setItem ("foo", "bar"); // add an item.

Source

SUPStorage.js, line 234.