Early & ExperimentalRey v0.3.1Interactive course

Rey learning path · 7 modules · 21 lessons

Learn Rey, one concept at a time.

A guided path through the language, from your first variable to expressive collections and reliable error handling. Run every example as you go.

Your learning progress
0 of 21 lessons complete
0%
Next up: Variables
CURRICULUM

Your course workspace

Select a module, work through each step, and save progress on this device.

PROGRESS SAVES AUTOMATICALLY
MODULE 013 lessons

The Basics

Get comfortable with values, inferred types, and the expressions you will use in every Rey program.

01

Variables

4 min

Use `var` for a value that can change, then update it with a compound assignment.

MAIN.REY
var count = 3;
count += 1;
println(count);
02

Inferred types

4 min

Rey infers a value’s type from its first assignment. `typeof` makes that visible here.

MAIN.REY
var score = 98;
var language = "Rey";
println(typeof(score));
println(typeof(language));
03

Expressions

5 min

Combine arithmetic and grouping to build a larger expression from smaller values.

MAIN.REY
var subtotal = 8 + 4;
var total = subtotal * 2;
println(total);