FratmScript 🤌🏻

Values and operators

Numbers, strings in "…" or '…' and backtick templates (` Uè ${nome} ) are JavaScript's. Special values have Neapolitan names: overo (true), sfòls (false), nisciun (null), boh` (undefined).

Logical operators are words: e or pure (&&), o (||), no or manco (!). Comparisons stay <, >, <=, >=, ==, !=.

a ?? b gives b when a is nisciun or boh; a?.b reads b only if a exists. chè è x is typeof x and x è uno Class is instanceof.

chist è nome = "Totò"
chist è anni = 42

stamm a dì(`${nome} tene ${anni} anni`)
stamm a dì(anni > 18 e nome != "", no overo)
stamm a dì(nisciun ?? "niente", boh ?? "nun definito")

chist è ordine = { cliente: { nome: "Ciro" } }
stamm a dì(ordine.cliente?.nome, ordine.consegna?.via ?? "ritiro al banco")

stamm a dì(chè è anni, [1, 2] è uno Array)

Output

Totò tene 42 anni
true false
niente nun definito
Ciro ritiro al banco
number true

Try this section in the playground