# Concept

> Teaches one idea in a few sentences, often with a visual, a formula, or code.

```json
{
  "id": "c1",
  "type": "concept",
  "title": "Interest on interest",
  "body": "With **compound interest**, each year's interest is added to your balance. Next year you earn interest on that bigger balance, so growth speeds up over time.",
  "visual": {
    "kind": "math",
    "tex": "A = P(1 + r)^n"
  },
  "term": {
    "word": "Principal",
    "definition": "The amount you start with, written \\( P \\)."
  }
}
```

A concept brick is the theory between questions. Each lesson has one to three of them, and each is followed right away by two to four questions that practise it.

## When to use it

* To introduce the idea the next questions practise.
* Keep it short: a title of up to 60 characters and a body of up to 80 words.

## Fields

| Field    | Required | Description                                       |
| -------- | -------- | ------------------------------------------------- |
| `title`  | yes      | Up to 60 characters                               |
| `body`   | yes      | Rich text, up to 80 words                         |
| `visual` | no       | HTML, a formula, or code                          |
| `term`   | no       | A key word and its definition, shown as a callout |

## More examples

A concept with code:

```json
{
  "id": "c1",
  "type": "concept",
  "title": "map builds a new array",
  "body": "**map** calls your function on every item and collects each return value into a **new array** of the same length. The original array isn't changed.",
  "visual": {
    "kind": "code",
    "code": "const prices = [10, 20];\nconst withTax = prices.map(p => p * 1.2);\n// withTax: [12, 24]\n// prices:  [10, 20]",
    "language": "javascript"
  }
}
```
