πŸ˜€ Hello World

christian.dinh's avatar
Published Aug 3, 2021Updated Sep 9, 2021
Contribute to Docs

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πŸ”€β—οΈ
πŸ‰

All contributors

Contribute to Docs

Learn Emojicode on Codecademy