Last active
August 4, 2016 11:21
-
-
Save ramsunvtech/5a67f4b7f83018b97774cb1ec1754bef to your computer and use it in GitHub Desktop.
Storage Prototyping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Storage.prototype.removeItems = function () { | |
for(item in arguments) { | |
this.removeItem(arguments[item]); | |
} | |
}; | |
// Usage | |
localStorage.setItem('first', 'first value'); | |
localStorage.setItem('second', 'second value'); | |
localStorage.removeItems('first', 'second'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment