Najova

DocsGuides

Get started

Najova is a general-purpose language for websites, APIs, games, bots and tools. Each line is one call: a name after a $, with its values in square brackets.

Najova 1.0 isn't out yet. These pages show how the language works today. Downloads open with 1.0.

Your first script

Save this as hello.naja, then run it from a terminal in the same folder:

najova run hello.naja
hello.naja
$-- Lines starting with $-- are notes for people
$let[name;Sam]
$print[Hello, $get[name]!]
$print[You have $sum[3;4] new messages]
najova run hello.naja
Hello, Sam!
You have 7 new messages

Najova reads the lines from top to bottom. $let gives the value Sam a name, $get reads it back, and $print writes a line.

How a line is built

Values are split by ;. A call can go inside another call's values, like $get[name] inside $print above. Capital letters don't matter for built-ins: $PRINT works too.

Check a script before you run it

najova check reads a script without running it and lists every mistake, with the line it's on and how to fix it.

typo.naja
$prnt[Hello]
$let[score;10
najova check typo.naja
typo.naja:1: There is no $prnt. Did you mean $print?
typo.naja:2: $let[ on line 2 has no closing ].

File names

Scripts end in .naja. You can also use the shorter .naj.