memorystorage icon indicating copy to clipboard operation
memorystorage copied to clipboard

Errors in comments for examples

Open macsir opened this issue 2 years ago • 0 comments

Some the statements below are not matching the comments. Better to tidy them up?

store.setItem('myString', 'Hello MemoryStorage!');
store.myObject = JSON.stringify({my: 'object'}));
alert(store.getItem('My string')); // alerts 'Hello MemoryStorage!'
alert(store['My string']); // alerts 'Hello MemoryStorage!'
alert(store.length); // alerts '2'
alert(store.key(1)); // alerts 'My object'
store.removeItem('My string');
alert(store.length); // alerts '1'
store.clear();
alert(store.length); // alerts '0'

macsir avatar Jan 11 '23 23:01 macsir