006 const cross target

✓ Passing This code compiles and runs correctly.

Code

input.k

Actual

Hello, World!
The answer is 42.

Expected output

✓ Zig✓ JavaScript
Hello, World!
The answer is 42.
Emitted JavaScript source
const name = "World";
const count = 42;
const main_module = {
  flow0() {
console.log("Hello, " + name + "!\nThe answer is " + count + ".");
  },
};
main_module.flow0();

Flows

flow ~const click a branch to expand · @labels scroll to their anchor
const (source: name: "World" count: 42)
flow ~print.blk click a branch to expand · @labels scroll to their anchor
print.blk (source: Hello, {{ name:s }}! The answer is {{ count:d }}.)

Test Configuration

MUST_RUN