Load previously saved data from localStorage.
Storage key (same key used with save, without the "sg_" prefix)
The parsed data, or null if not found or corrupted
const hs = sg.load('highscore');if (hs) { console.log('Best:', hs.score); } Copy
const hs = sg.load('highscore');if (hs) { console.log('Best:', hs.score); }
Load previously saved data from localStorage.