DOCUMENTATION

The syntax, symbol by symbol.

Emoji Script replaces the keywords of a programming language with emojis. Everything else stays the same: variables, conditions, loops and statements read from top to bottom. This page gathers every symbol of the language, what it replaces and how to put them together.

THE BASICS

Six rules and you can read any script.

Every statement ends

Like a full stop at the end of a sentence. Without it, the compiler cannot tell where your statement stops.

Blocks open and close

Everything between the open padlock and the closed padlock belongs to the condition or to the loop.

Text goes between quotes

Everything between these two emojis is printed as is, emojis included.

Moons are parentheses

They wrap a condition or whatever you want to print.

The finger announces the block

It sits between the condition and the block that follows it.

Names stay in letters

Variables are written with regular letters: score, age, message.

REFERENCE

Every symbol of the language.

On the left the emoji, in the middle its equivalent in a classic language, on the right what it does.

Values and numbers

0️⃣ 1️⃣ 2️⃣ … 9️⃣0 1 2 … 9The digits
⏺️.The decimal point
πŸ’―trueTrue
🧒falseFalse
πŸ‘»nullEmpty value
πŸ’¬ … 🀫" … "A piece of text

Operations

βž•+Addition, and joining two texts
βž–-Subtraction
βœ–οΈ*Multiplication
βž—/Division
➑️=Store a value in a variable

Comparisons

🀝==Equal to
πŸ™…!=Different from
πŸ’ͺ>Greater than
🀏<Less than

Structures

πŸ€”ifIf the condition is true
πŸ™ƒelseOtherwise
πŸ”whileAs long as the condition is true
πŸ”“ … πŸ”’{ … }Start and end of a block
🌜 … πŸŒ›( … )Parentheses
πŸ“€ … πŸ“₯[ … ]Brackets

Built-in functions

πŸ—£οΈprint(…)Display a result
πŸ“len(…)Count the characters of a text

Punctuation

πŸ™;End of a statement
πŸ‘‰:Separates the condition from its block
πŸ”Ή,Separates two items
PUTTING IT TOGETHER

Writing your first lines.

A variable

Output
score➑️7οΈβƒ£πŸ™
πŸ—£οΈπŸŒœscoreπŸŒ›πŸ™
7

The arrow stores the value in the variable. The variable name is written with regular letters.

A condition

Output
age➑️1️⃣8οΈβƒ£πŸ™
πŸ€”πŸŒœageπŸ’ͺ1️⃣7οΈβƒ£πŸŒ›πŸ‘‰πŸ”“
  πŸ—£οΈπŸŒœπŸ’¬Access granted βœ…πŸ€«πŸŒ›πŸ™
πŸ”’πŸ™ƒπŸ‘‰πŸ”“
  πŸ—£οΈπŸŒœπŸ’¬Access denied βŒπŸ€«πŸŒ›πŸ™
πŸ”’
Access granted βœ…

If the condition between the moons is true, the first block runs. Otherwise the πŸ™ƒ block does.

Count from 1 to 5

Output
i➑️1οΈβƒ£πŸ™
πŸ”πŸŒœi🀏6οΈβƒ£πŸŒ›πŸ‘‰πŸ”“
  πŸ—£οΈπŸŒœiπŸŒ›πŸ™
  i➑️iβž•1οΈβƒ£πŸ™
πŸ”’
12345

As long as i is smaller than 6, the block runs. The last line moves the counter forward; without it the loop would never stop.

The length of a text

Output
messageβž‘οΈπŸ’¬Emoji Script πŸ€―πŸ€«πŸ™
πŸ—£οΈπŸŒœπŸ“πŸŒœmessageπŸŒ›πŸŒ›πŸ™
15

πŸ“ counts characters. Careful: an emoji often takes two characters for the browser.

See the ten examples β†’

TROUBLESHOOTING

The error messages, translated.

Unclosed string: add 🀫 at the end of your text.

You opened a text with πŸ’¬ without closing it with 🀫. The compiler then reads the rest of the script as text.

Unknown symbol near …

A character is not part of the language. It is often a lookalike emoji, for example πŸŒ™ instead of 🌜, or a plain digit stuck to an emoji.

Execution stopped after 2 seconds

Your πŸ” loop never ends. Check that the tested variable really changes inside the block, for example with i➑️iβž•1οΈβƒ£πŸ™.

Forbidden identifier

Some names reserved by the browser are blocked for security reasons. Pick another variable name.

YOUR TURN

Try the syntax
in the compiler.

The compiler is free, accountless and runs entirely in your browser.

Open the compiler πŸš€