Storage removeItem method
Stay organized with collections
Save and categorize content based on your preferences.
removeItem(
key: string
): void;
Removes the key-value pair with the given key, if a key-value pair with the
given key exists.
Examples
GameSnacks.storage.removeItem('starsEarned');
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-03 UTC."],[[["\u003cp\u003e\u003ccode\u003eremoveItem\u003c/code\u003e is a function that removes a specific key-value pair from the storage.\u003c/p\u003e\n"],["\u003cp\u003eIt requires the \u003ccode\u003ekey\u003c/code\u003e of the data to be removed as an argument.\u003c/p\u003e\n"],["\u003cp\u003eIf a key-value pair with the specified \u003ccode\u003ekey\u003c/code\u003e exists, it will be deleted, otherwise, the function does nothing.\u003c/p\u003e\n"]]],[],null,["# Storage removeItem method\n\n removeItem(\n key: string\n ): void;\n\nRemoves the key-value pair with the given key, if a key-value pair with the\ngiven key exists.\n\nExamples\n--------\n\n GameSnacks.storage.removeItem('starsEarned');"]]