All lessons

Your First Program

6 min · OCaml

Write and run your very first OCaml program — right here on the page.

OCaml · Your First Program0/5 cleared

Enemy 1 of 5

In OCaml, let () = ... runs an action. print_endline prints a message and adds a new line; the text goes inside quotes.

Press Run.

You
Pincer Crab

Loading editor...

Ln 1, Col 1Spaces: 4
Sign up to fightTarget output: Hello, World!