Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3fbc079

Browse files
Chore: Activity-2 completed for Day-20
1 parent 8d35021 commit 3fbc079

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎Day20/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ const myObject = {
2121
};
2222
localStorage.setItem('myObjectKey', JSON.stringify(myObject));
2323
const retrievedObject = JSON.parse(localStorage.getItem('myObjectKey'));
24-
console.log(retrievedObject); // Output: { name: 'Yash', age: 24, profession: 'Software Engineer' }
24+
console.log(retrievedObject);
2525

2626

2727
console.log("-------------------------------------------------");
2828
console.log("Activity 2: ");
2929

30-
30+
// Task 3: Create a simple form that saves user input (e.g., name and email) to localStorage when submitted. Retrieve and display the saved data on page load.
31+
// Task 4: Write a script to remove an item from localStorage. Log the localStorage content before and after removal.
32+
console.log("\nTask Completed!");
3133

3234
console.log("-------------------------------------------------");
3335
console.log("Activity 3: ");

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /