LESSON 10 OF 50

Build a value summary

Combine a constant, an updated variable, a comparison and a template literal.

Official sourceECMAScript — lexical declarationsReviewed: 2026-08-26
STEP 1 · LEARN

How it works

A small program can transform data in steps: declare stable values, update changing state, derive a boolean and compose the final result.

Correct example
const studio = 'MP Web Studio';
let projects = 2;
projects += 1;
const active = projects > 0;
console.log(`${studio} | ${projects} | ${active}`);

Each step produces a value used by the next, and the output reflects the final state.

Common mistake
console.log('MP Web Studio | 3 | true');

The text may look identical but does not demonstrate declaring, updating and deriving the values.

STEP 2 · APPLY

Your exercise

Complete the steps so the final summary is “MP Web Studio | 3 | true”.

STEP 3 · RUN

Write and run the code

script.jsJAVASCRIPT
Isolated consoleisolated
Preparing the runtime…
Run the code to see the result.
The draft stays only in this browser.Isolated QuickJS · no DOM, session or network
STEP 4 · CHECK

What needs to pass

0%not checked
  • studio and active are const, while projects uses let.
  • projects is updated after its declaration.
  • The output is the required final summary.
Explain the solution logic

The result passes only when both the real output and the structural steps are present.