✓
Passing This code compiles and runs correctly.
The smallest Koru program that prints something — and the first place to see what makes Koru different from the languages you already know.
Code
// Hello World in pure Koru.
// This is the frontpage example from korulang.org.
import std/io
std/io:print.blk {
{% if debug %}[DEBUG] {% endif %}Hello, {{ name:s }}!
The answer is {{ count:d }}.
}
Actual
[DEBUG] Hello, World!
The answer is 42.
Expected output
✓ Zig✓ JavaScript[DEBUG] Hello, World!
The answer is 42.
Emitted JavaScript source
const name = "World";
const debug = true;
const count = 42;
const main_module = {
flow0() {
console.log((debug ? "[DEBUG] " : "") + "Hello, " + name + "!\nThe answer is " + count + ".");
},
};
main_module.flow0();
Test Configuration
MUST_RUN