π Hello World
We write Emojicode programs in files with the extension .emojic or .π.
Almost all the code in an Emojicode program will live inside a π
block. A block is a collection of code. The π
block indicates all the code that should run when the file is executed.
Within our larger program, we can indicate one or more blocks of code with π
π
code blocks:
π
to indicate the start of the code blockπ
to indicate the end of the code block
So a basic Emojicode file will have the following structure:
π π
Some code go here
π
To print in Emojicode, we use the π
βοΈ
method:
π π€Hello, World!π€βοΈ
This prints βHello, World!β to the terminal.
π€Hello, World!π€
is a string. It holds the message we want to print to the terminal.- We wrap the thing we want to print with a
π
at the start and aβοΈ
at the end.
Example
Hereβs a program called welcome.emojic that prints a string:
π ππ π€Welcome to Codecademy Docsπ€βοΈπ
Contributors
- Anonymous contributors