Tutorials
Explore JaggerScript
Learn through a guided exercise with a concrete checkpoint.
Work through this exercise in order. The checkpoint tells you what to observe before you move to the detailed reference.
1. Open /jaggerscript and select a built-in example that constructs an object and calls a method. Using an existing runnable example avoids guessing an entry-point convention.
2. Run the example unchanged and record its output. Locate the class fields, constructor arguments, and method that changes a field.
3. Change one numeric constructor argument, rerun, and compare the output. Then change a declared type name to an unknown name and inspect the editor marker. Restore it before continuing.
4. Checkpoint: valid source reaches execution; malformed source or an unknown declared type is marked by tooling. Next inspect the Counter fragment below and identify the frame-local argument and the heap-backed field. The fragment defines a class; it is not a complete runnable entry program.
class Counter {
number value = 0;
constructor(number start) { value = start; }
func number next() {
value = value + 1;
return value;
}
}