Pas2JS pascal source code
WriteLn(Format('hello', []));
WriteLn(Format('hello %s', ['world']));
WriteLn(Format('hello %s %d', ['world', 123]));
WriteLn(Format('hello %s %d %.1f', ['world', 123, 12.5]));
var
s = 'WORLD';
var
i = 456;
var
f = 3.14;
WriteLn(Format('hello %s', [s]));
WriteLn(Format('hello %s %d', [s, i]));
WriteLn(Format('hello %s %d %f', [s, i, f]));
{<<< RESULT - CONSOLE LOG >>>
-----------------------------
hello
hello world
hello world 123
hello world 123 12.5
hello WORLD
hello WORLD 456
hello WORLD 456 3.14
-----------------------------
{<<<<<<<<< THE END >>>>>>>>>}
function WriteLn(value) {
if (window.console) { window.console.log(value); } };
var s = "",
i = 0,
f = 0;
/* <<< main JS >>> */
WriteLn("hello");
WriteLn("hello world");
WriteLn("hello world 123");
WriteLn("hello world 123 12.5");
s = "WORLD";
i = 456;
f = 3.14;
WriteLn(("hello "+s.toString()));
WriteLn(("hello "+s.toString()+" "+i.toString()));
WriteLn(("hello "+s.toString()+" "+i.toString()+" "+f.toString()));