← Back to DocsPrint
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: 25Expressions in print
You can pass any expression — it gets evaluated before printing:
print(1 + 1); // 2
print(10 * 3 + 2); // 32
print(5 == 5); // trueMultiple 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 = 20Variables and function calls
let name = "VDX";
print("Welcome to", name);
fn double(n) { return n * 2; }
print("result:", double(5)); // result: 10Escape sequences
| Sequence | Output |
|---|---|
\\n | Newline |
\\t | Tab |
\\\\ | Backslash |
\\" | Double quote |