Created
August 2, 2025 15:52
-
-
Save davidystephenson/4fd1cfdb4e003b0f8b310619db65785c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<script> | |
const review = { message: 'Those were some cute dogs!' } | |
const reviewJson = JSON.stringify(review) | |
localStorage.setItem('review', reviewJson) | |
const localReview = localStorage.getItem('review') | |
console.log('localReview', localReview) | |
console.log('localReview.message', localReview.message) | |
const parsedReview = JSON.parse(localReview) | |
console.log('parsedReview.message', parsedReview.message) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment