Hello world
Outputπ£οΈππ¬Hello, world! ππ€«ππ
The shortest possible script: π£οΈ prints, the moons wrap, and the text lives between π¬ and π€«.
Each example shows the code, the exact output it prints and what to remember. The link under each script opens it in the compiler, already loaded.
π£οΈππ¬Hello, world! ππ€«ππ
The shortest possible script: π£οΈ prints, the moons wrap, and the text lives between π¬ and π€«.
scoreβ‘οΈ7οΈβ£π
π£οΈπscoreππ
The arrow stores the value in the variable. The variable name is written with regular letters.
priceβ‘οΈ1οΈβ£2οΈβ£π
quantityβ‘οΈ3οΈβ£π
π£οΈπpriceβοΈquantityππ
The four operations work like on a calculator, with β β βοΈ and β.
ageβ‘οΈ1οΈβ£8οΈβ£π
π€πageπͺ1οΈβ£7οΈβ£πππ
π£οΈππ¬Access granted β
π€«ππ
ππππ
π£οΈππ¬Access denied βπ€«ππ
π
If the condition between the moons is true, the first block runs. Otherwise the π block does.
iβ‘οΈ1οΈβ£π
ππiπ€6οΈβ£πππ
π£οΈπiππ
iβ‘οΈiβ1οΈβ£π
π
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.
nβ‘οΈ5οΈβ£π
ππnπͺ0οΈβ£πππ
π£οΈπnππ
nβ‘οΈnβ1οΈβ£π
π
π£οΈππ¬Liftoff ππ€«ππ
Same idea, but the counter goes down. The last line runs once the loop is over.
iβ‘οΈ1οΈβ£π
ππiπ€6οΈβ£πππ
π£οΈπ7οΈβ£βοΈiππ
iβ‘οΈiβ1οΈβ£π
π
One loop and one multiplication are enough to print a whole times table.
totalβ‘οΈ0οΈβ£π
iβ‘οΈ1οΈβ£π
ππiπ€1οΈβ£1οΈβ£πππ
totalβ‘οΈtotalβiπ
iβ‘οΈiβ1οΈβ£π
π
π£οΈπtotalππ
Two variables: one for the counter, one for the result that grows on every pass.
messageβ‘οΈπ¬Emoji Script π€―π€«π
π£οΈπππmessageπππ
π counts characters. Careful: an emoji often takes two characters for the browser.
nameβ‘οΈπ¬Yoannπ€«π
π£οΈππ¬Hi π€«βnameππ
β also glues two pieces of text together.
You can edit any of these scripts in the compiler, then click Share to get a link that reopens your own version.
The compiler is free, accountless and runs entirely in your browser.