Learn by example

bubblecode Examples

Every example runs live in your browser through bubblecode's WebAssembly runtime. Edit the source, click Run, and see results instantly.

Beginner

Hello World

Your first bubblecode program — print a greeting to the screen.

Beginner

Variables

Assign values with put/into and set/to, use the add command.

Beginner

Math

Arithmetic operators and built-in math functions.

Beginner

Strings

Concatenation, string functions, contains checks, and the quote constant.

Intermediate

Control Flow

If/else chains, repeat loops with step, countdown, and nested loops.

Intermediate

Functions & Handlers

Define functions, handlers, recursion (factorial, fibonacci).

Interactive has user input

Interactive Greeter

Use ask/answer to prompt for user input and respond.

Interactive has user input

Tic Tac Toe

Full two-player game with board rendering and win detection.

Back to home.