# 019: Optional Values
# Handling values that might not exist

# Function that might not return a value
find_user(id):
  users = [
    { id: 1, name: "Alex" },
    { id: 2, name: "Jordan" }
  ]

  for user in users:
    if user.id == id:
      return user

  return null

# Try to find existing user
user = find_user(1)
if user != null:
  show "Found: {user.name}"
else:
  show "User not found"

# Try to find non-existent user
missing = find_user(99)
if missing == null:
  show "User 99 doesn't exist"
