localstorgae set item code example Example: javascript localstorage var KeyName = window.localStorage.key(index);