← Back to Docs

Print

print() outputs values to the terminal. It accepts any number of arguments separated by commas.

Syntax

print(expr);
print(expr1, expr2, expr3);

Basic usage

print("hello");         // hello
print(42);              // 42
print("age:", 25);      // age: 25

Expressions in print

You can pass any expression — it gets evaluated before printing:

print(1 + 1);           // 2
print(10 * 3 + 2);     // 32
print(5 == 5);          // true

Multiple arguments

Multiple arguments are separated by a space in the output. Each print() call ends with a newline.

print("x =", 10, "y =", 20);
// Output: x = 10 y = 20

Variables and function calls

let name = "VDX";
print("Welcome to", name);

fn double(n) { return n * 2; }
print("result:", double(5));    // result: 10

Escape sequences

SequenceOutput
\\nNewline
\\tTab
\\\\Backslash
\\"Double quote