I have created a function for deleting all game data from the localStorage but when attempting to use the function in the chrome developer console it returns undefined
cant seem to figure out why
EDIT:
I forgot that return may confuse some veteran devs as to what I meant
My point is in the console it says undefined
after running the function HardReset()
and nothing in the game is actually reset
EDIT: The main issue is the function isnt actually removing the items from the storage
/*
---------------------
Reset Entire Game
---------------------
*/
function HardReset(){
localStorage.removeItem("money");
localStorage.removeItem("level");
localStorage.removeItem("exp");
localStorage.removeItem("clickIncrement");
localStorage.removeItem("clicksTotal");
localStorage.removeItem("HTMLSupport");
localStorage.removeItem("CSSSupport");
localStorage.removeItem("HTMLCoderCost");
localStorage.removeItem("HTMLCoderOwned");
localStorage.removeItem("CSSCoderCost");
localStorage.removeItem("CSSCoderOwned");
}