Skip to content

Hello World

const message be ///Hello, World///
console.log[message]

This compiles to:

const message = "Hello, World";
console.log(message);

Compile to a file:

Terminal window
purus build hello.purus
node hello.js

Or run directly:

Terminal window
purus run hello.purus
JavaScriptPurus
=be
"string"///string///
fn(args)fn[args]
{ } blocksindentation
functionfn
+ - * /add sub mul div
=== !==eq ne
&& || !and or not
const x be 42
let y be 3.14
y be 100
fn greet name
console.log[///Hello/// add name]
greet[///World///]

Expression body with to:

fn double x to x mul 2