# 071: Store Data Locally
# Save data to the device

# Simple storage
preferences = {
  theme: "dark",
  language: "en",
  notifications: true
}

store preferences locally as "user_prefs"
show "Preferences saved"

# Store multiple items
user_data = { name: "Alex", email: "alex@example.com" }
app_settings = { sidebar_collapsed: false, font_size: 14 }

store user_data locally as "user"
store app_settings locally as "settings"

# Store lists
todos = [
  { id: 1, text: "Buy groceries", done: false },
  { id: 2, text: "Write code", done: true },
  { id: 3, text: "Exercise", done: false }
]

store todos locally as "todos"
show "Saved {todos.length} todos"

# Data persists across sessions
# Stored in IndexedDB (browser) or local filesystem (native)
