πŸ’­ Comments

christian.dinh's avatar
Published Jul 23, 2021Updated May 15, 2024
Contribute to Docs

A comment is a piece of text within a program that is not executed. It can be used to provide additional information to aid in understanding the code.

There are two types of comments in Emojicode.

Single-line Comments

In Emojicode, single-line comments are made with πŸ’­. Any text after the πŸ’­ that is on the same line is not executed.

πŸ’­ The next line outputs "Hello"
πŸ˜€ πŸ”€HelloπŸ”€β—οΈ

Multiline Comments

Multiline comments are created with πŸ’­πŸ”œ and πŸ”šπŸ’­. Any text in between is not executed.

πŸ’­πŸ”œ
This is a comment.
It will be ignored by the compiler.
πŸ”šπŸ’­

Example

Here’s a whole Emojicode program with comments:

πŸ’­πŸ”œ
Emojicode is created by:
Theo Weidmann
πŸ”šπŸ’­
🏁 πŸ‡
πŸ˜€ πŸ”€Hello World!πŸ”€β—οΈ
πŸ’­ Output: Hello World!
πŸ‰

All contributors

Contribute to Docs

Learn Emojicode on Codecademy