print_endline "hello" prints a string and a newline. Function application is just a space: no parentheses around arguments, no commas.
OCaml · Lesson 1 · On the house
Hello OCaml
print_endline, let () =, comments, utop, and ocaml or dune to run. Lesson 1 is free — on the house.
Lessons · OCaml · Lesson 1 of 10 · On the house
Hello OCaml
print_endline, let () =, comments, utop, and ocaml or dune to run.

A program's top-level effects are usually written let () = print_endline "hello". The () pattern says the expression returns unit, OCaml's 'no meaningful value'.
Comments are (* like this *) and they nest. There are no line comments.
Try code in utop, the interactive toplevel, ending phrases with ;;. Run a file with ocaml hello.ml, or build projects with dune build and dune exec ./hello.exe.
Misses: writing print_endline("a", "b") with a comma (that is a tuple), and using // comments.
hello
(* hello.ml *)
let () =
print_endline "hello";
print_endline (string_of_int (2 + 3))
Quiz
Quiz
Quiz
Quiz
Check
Match the still for: Hello OCaml.
Open-book: the answers are on this page. Pass every quiz and check (5) to mark the lesson done. This visit: 0/5.