Code Lab is in development. New lessons and improvements are on the way. Progress can be deleted.
JAVASCRIPT / CHAPTER 06
JavaScript
Storage.
Storing data: JSON vs object, parse and shape guards, window.labStorage, a list and CRUD with stable ids, corrupt data with explicit recovery, failed writes, and an expense app. Learn and Practice; challenges are separate.
Choose a section
Lesson with explanation and a guided task. Theory stays readable; completion requires a passing solution.
Challenges are optional and do not block the next chapter.
11 lessons available
The foundations behind your ideas.
- 01Open lesson
JSON vs Object · Locked
JSON is text, an object is a value
- 02Open lesson
Stringify & Parse · Locked
JSON round-trip
- 03Open lesson
Nested JSON · Locked
array of objects with nested arrays
- 04Open lesson
Invalid JSON · Locked
try/catch around JSON.parse
- 05Open lesson
Shape Guard · Locked
valid JSON, wrong shape
- 06Open lesson
labStorage Basics · Locked
getItem, setItem, removeItem, null vs ""
- 07Open lesson
Save a List · Locked
array as JSON under one key
- 08Open lesson
CRUD Records · Locked
stable ids, edit, delete
- 09Open lesson
Corrupt & Recover · Locked
load error is not an empty store
- 10Open lesson
Write Failure · Locked
QuotaExceededError and an honest status
- 11Open lesson
Expense App · Locked
save and restore a list