Logo

Programming-Idioms

  • Perl
  • Js
document.write("Hello World!");

This prints the output to the rendered browser document.

However, this method is "strongly discouraged".
console.log('Hello World');

This prints output to the console on any standard browser.
console.log('Hello World')

"... The console object provides access to the debugging console".

There is also `info`, `warn`, `error`, `debug`, etc.
use 5.010;
say 'Hello World';

like print, but automatically adds a newline
print "Hello, world!\n";

The print statement doesn't put an automatic newline: it must be asked for explicitly.
with Ada.Text_IO;
use Ada.Text_IO;
Put_Line ("Hello World!");

New implementation...
< >
programming-idioms.org