Last active
October 18, 2020 02:39
-
-
Save tofusoup429/5ea4a52966e3bde6e73ae9d0f0293396 to your computer and use it in GitHub Desktop.
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
let dataFetchedFromRemoteForCompanyInfo = { | |
name:"ABC corp", | |
address: "4090 Shady Pines Drive Independence VA", | |
postalCode: 24348 | |
} | |
let dataFetchedFromRemoteForUserInfo = { | |
name:"ABC corp", | |
title: "manager", | |
} | |
localStorage.setItem('companyInfo', JSON.stringify(dataFetchedFromRemoteForCompanyInfo)) | |
localStorage.setItem('userInfo', JSON.stringify(dataFetchedFromRemoteForUserInfo)); | |
localStorage.removeItem('companyInfo'); //remove only 'companyInfo' key-value | |
localStorage.clear() //remove all key-value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment