We write Emojicode programs in files with the extension .emojic or .🍇. Here in the code editor, we have a file named hello.emojic. It will also work if it’s named hello.🍇.
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 goes here More code goes here 🍉
Let’s see some Emojicode in action!
The provided program has a single line of code
😀 🔤Hello, world!🔤❗️.
This lives within a
🍉 code block. We will explain exactly how that line works soon, but for now, press Run to see the program in action.
What message appeared in the terminal?