> For the complete documentation index, see [llms.txt](https://alture.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alture.gitbook.io/docs/about-us/the-projects-part/lunascript.md).

# LunaScript

<a href="https://lunascript.onrender.com/" class="button secondary small" data-icon="link">LunaScript</a>

<a href="https://www.npmjs.com/package/lunascript-fr" class="button secondary small" data-icon="npm">LunaScript on NPM</a>

The goal of LunaScript is to create a **French version of JavaScript** rather than using normal JavaScript and need to translate every line.

LunaScript should therefore be considered part of **Alture's developer ecosystem**.

## Synthax

#### Variables

```
def nom = "Alberto67"
var compteur = 0
```

#### If statements

```
si (compteur > 5) {
    msg("OK")
} sinon {
    err("Erreur : trop petit")
}
```

#### Loops

```
repeter 5 {
    msg("Salut")
}
```

#### Using document

```
doc.el("titre").texte = "Bienvenue"
doc.el("zone").ajouter("p", "Hello LS")
```
