recipes · recipe ·

Give a number a name

Store and change a score.

cpurecipe

Suppose Pip picks up a crystal. We need to remember the score between actions. A variable gives a value a name so we can use it again. Read int score = 0 as: make a whole-number value named score, starting at zero. int means integer, which is a whole number. The equals sign stores a value; it does not ask whether two values match.

start.yh

Status: complete-program

Give a number a name

Store and change a score.

cpu · type checked

int score = 0
score = score + 10
Console.Log("Score: " + Text.From(score))
project.mech
manifestVersion = "2"
package = "api.example.recipe__values"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"
Expected output
Score: 10
Notes and source

Change the starting score to 20. Predict the result before you run it. Then award another ten with a second assignment.

demonhunterlabs/app/lib/yeho-walkthrough.ts