Bitbop runs classic ES5 JavaScript inside a preemptable worker. This generated reference is intended for parents, tutors, teachers, and advanced learners who need the exact contract behind each studio command. Use the contents or your browser's Find command to jump directly to a namespace, function, callback, or options type.
Program model
Code runs directly from top to bottom. Use var, function declarations, and function () {} callbacks. Arrow functions, let, const, classes, modules, the DOM, networking, and browser timers are unavailable.
while (true) {
Turtle.move(5);
sleep(50);
}
Run creates a fresh realm. Pause freezes continuations and queues input. Step executes one meaningful highlighted source action without waiting for sleeps. Resume continues. Stop discards the realm, callbacks, prompts, sleepers, and sounds.
Status
Meaning
Running
Statements or an input callback are executing.
Waiting
Every runnable continuation is sleeping.
Listening
Top-level code finished and callbacks remain available.
Paused
Continuations and queued input are suspended.
Done
Top-level code finished without callbacks.
Stopped
The realm was destroyed.
Coordinates, colors, and notes
Canvas coordinates use a 640×480 learner space with (0, 0) at the top-left. X increases right and Y increases down. Display resizing never changes learner coordinates.
Colors are case-insensitive and accept the complete family of CSS named colors plus #RGB and #RRGGBB. Notes accept names such as C4, F#3, and Db5, or MIDI numbers from 0 through 127.
Input lifecycle
A later registration replaces the earlier callback of the same kind. Input callbacks keep completed code in Listening. Paused input queues in order and can be executed with Step while preserving source highlighting and local-scope Console inspection. Stop, an error, or a fresh Run clears callbacks.
Console and errors
The lower Console runs snippets in the current realm. After Step or a debugger; statement, it uses the highlighted line's local scope. You can inspect or assign variables before Resume. Autocomplete reflects the interpreter's supported Bitbop and JavaScript globals, nested members, parameters, local variables, and runtime-known object members. Functions offer classic-JavaScript call snippets and concise help. Variable values stay inside the worker. Resume and Stop return the Console to Global. A later pause sets a new local scope. Runtime and syntax errors keep their short original message. Bitbop adds a plain-language suggestion and highlights the source line without moving the workspace.
Use JavaScript's debugger; statement to pause at a chosen point. Bitbop highlights that line and keeps its scope for the Console. Put the statement in an if block to pause only when a condition is true:
if (mark === 17) {
debugger;
}
debugger; belongs in the Code editor, not in a Console snippet. Step runs the next meaningful statement. Resume continues normal execution.
Limits
The worker yields after at most 1,600 interpreter steps or roughly 6 milliseconds. Two million continuous steps without a wait trigger a friendly watchdog error. Console output, rendering queues, Paint strokes, audio voices, prompts, projects, and share URLs are bounded. The learner realm cannot access the browser DOM, host globals, network, or storage.