{"id":"recipe--values","name":"Give a number a name","owner":"yeho","package":"recipes","kind":"recipe","signature":"start.yh","description":"Store and change a score.","context":"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.","parameters":[],"returns":"","members":[],"tags":["cpu","recipe"],"updated":"2026-09-09","source":{"repository":"demonhunterlabs","path":"app/lib/yeho-walkthrough.ts"},"status":"complete-program","notes":["Change the starting score to 20. Predict the result before you run it. Then award another ten with a second assignment."],"examples":[{"id":"program","title":"Give a number a name","description":"Store and change a score.","code":"int score = 0\nscore = score + 10\nConsole.Log(\"Score: \" + Text.From(score))","manifest":"manifestVersion = \"2\"\npackage = \"api.example.recipe__values\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n","tags":["cpu"],"run":"cpu-oracle","expected":"Score: 10","verification":"type checked","sha256":"b5a5d2f0bd08ac34d1ab30cae7a250230a3e4c7dcf12072a9c775e706aea5c57","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=recipe--values","json":"https://demonhunterlabs.com/reference/items/recipe--values.json","markdown":"https://demonhunterlabs.com/reference/text/recipe--values.md"}
