Lesson 1 of 15
Hello, OCaml!
Your First OCaml Program
In OCaml, print_endline prints a string followed by a newline:
print_endline "Hello, World!"
You can also print integers and floats with dedicated functions:
print_int 42
print_newline ()
print_float 3.14
print_newline ()
Comments
(* This is a comment *)
(* Comments can
span multiple lines *)
Your Task
Print exactly Hello, World!.
JS Transpiler loading...
Loading...
Click "Run" to execute your code.