Web Build 068

JavaScript basics: Number calculations

Build number calculations inside the persistent Course dashboard: Number calculations starter project.

JavaScript basics
10 minutes Core Lesson 68 of 120
constletfunctionifarrayreturn
Lesson 68 of 120 0/120 lessons 0/18 missions JavaScript basics · 10 minutes
0%
Continue View profile
Web fundamentals lab Simulated editor
New learnerrank 0XP 0%complete
Current edit

Name the lesson values

Add the exact const declarations for the lesson topic and project name.

Target
app.js · Replace the starter comment in app.js.
Evidence
Two descriptive constants store the lesson values.
app.js javascript
Preview allowlisted render
Console text only
Instructions 10 minutes

Load exact snippets or type matching Web code. Run each task, compare the preview, then press Check to save the lesson.

Start with the Current task. Edit its named project file, press Run, compare the reviewed preview, then continue. Press Check only after every task is complete.

Name the lesson values

Add the exact const declarations for the lesson topic and project name.

Target app.js · Replace the starter comment in app.js. Evidence Two descriptive constants store the lesson values. Snippet const lessonTopic = "Number calculations"; const projectName = "Course dashboard: Number calculations";
Next up
Define a small function

Add the exact buildStatus function and return statement.

Target app.js · After the first declarations. Evidence A named function accepts a parameter and returns a status string. Snippet function buildStatus(topic) { return `${topic} is ready`; }
Next up
Use the function and collection

Add the exact learningSteps array, function call, and console statement, then Run and Check.

Target app.js · At the end of app.js. Evidence The function result and array length are used in a final statement. Snippet const learningSteps = ["read", "run", "check"]; const statusMessage = buildStatus(lessonTopic); console.log(statusMessage, learningSteps.length);
Next up
Lesson support

What to notice while you play.

Objective

Complete a project-shaped number calculations build while preserving each passing edit.

Hint

Start with the Current task. Open app.js, use Show exact edit when needed, Run, then follow the highlighted next task.

Why it matters

JavaScript basics becomes durable when every syntax choice is tied to a visible project outcome and a specific piece of evidence.

Common mistakes
  • Editing the wrong file instead of app.js.
  • Replacing earlier passing work instead of preserving it for the next step.
  • Pressing Check before every task has passed Run.
  • Expecting learner HTML, CSS, or JavaScript to execute; the preview uses reviewed scene states only.
Reference

Snippets in this lesson.

Run

Render a simulated preview from the current lesson snippet.

Check

Save the lesson after the required task snippets are complete.

Hint

Show the lesson hint without changing progress.

Reset

Clear local Web lab scratch state for this browser.