Instance Property

length

The number of key-value pairs currently in the storage list.

Declaration

tvOS
readonly attribute int length;
Safari Desktop, Safari Mobile
readonly attribute unsigned long length;

See Also

Accessing Key-Value Pair Information

clear

Removes all instances of key-value pairs from the storage list.

getItem

Retrieves the data associated with the specified key.

key

Returns the key located in the specified location.

removeItem

Deletes a key and all associated data from storage.

setItem

Associates the given data with the given key.