Learn AI.
FROM AN IDEA TO A PROGRAM

Code a small idea.
Watch every step.

Learn the five building blocks, then train a tiny neuron. Edit real program text and inspect what it does. No installation or account needed.

This path is optional and does not change your required lesson completion. It runs a small, explicitly supported subset of JavaScript in a local interpreter. Your code cannot call browser or network APIs through this runner.

1 · Name a value

Variables give a value a reusable name.

const declares a name you will not reassign. let declares one that can change. The equals sign assigns the value on the right to the name on the left. Multiplication uses *. print(...) puts a value in this lab’s output panel.

PREDICT BEFORE YOU RUN

Before running, predict the value of prediction. Does the computer multiply before adding?

Your change to try

Change input to 4. Keep weight = 3 and bias = 2. The printed prediction should be 14.

Show a hint

Change the number on the first line. A named variable must be declared before you use it.

Drafts save on this device. Run uses the current editor text. Editing clears the previous result; loading a saved draft never runs it automatically.

Explain what your code does

What does const prediction = weight * input + bias do?

What does const prediction = weight * input + bias do?

What this runner supports

Use numbers, quoted strings, booleans, null, flat arrays, let/const, arithmetic, comparisons, && / ||, if/else, for, for…of, while, break, named top-level functions, return, and print(...). Read arrays with numeric indices or .length. Declare names and functions before use. Function definitions cannot be reassigned. The runner rejects unsupported syntax with an explanation.

This is a teaching subset, not a full JavaScript engine. It excludes objects, prototypes, imports, classes, browser APIs, promises, arrow functions, nested function declarations, and automatic declaration hoisting. It requires finite numeric arithmetic. Downloaded programs use standard JavaScript syntax, but print is a lab helper: replace it with console.log in a JavaScript console.

Limits: 8,000 source characters, 10,000 interpreted operations, 64 values per array, 16 nested function calls, strings of 256 characters, and 40 output lines totaling at most 4,000 characters. A worker timeout provides an additional stop. Cancel, tab hiding, leaving the panel, or navigation stops running work. The trace is a replay of recorded calculations; replay does not run the program again.

Back up all six editable drafts through My Work. Optional coding results and quiz answers are temporary; they are not credentials or course grades.

Learn AI · Understand by doing.Loading local progress…Copyright (c) 2026 Mobi Weave, Inc. All rights reserved