Color theme
0 day streak0 XPP1
JavaScriptQuiz mode
MISSION 1 OF 3

A message after Save

0 XP earned
JavaScript track: BeginnerMission: BeginnerFunction parametersTemplate literalsReturn values
Before you start this beginner track

Variables, strings, and function calls. Array callbacks are introduced in later missions.

Guided code reading and debugging. Runnable coding challenges are available in JavaScript, Python, and SQL.

x
0 / 6 challenges
KNOWLEDGE CHECK

Predict the result.

What single line is logged?

mission.js
function savedMessage(documentName) {  return `Saved: ${documentName}`;}const documentName = "Sketch";console.log(savedMessage(documentName));

Run each standalone ES2020+ script in Node.js or a browser console. These examples simulate interface data; no HTML or DOM setup is required. Read only console.log output.

Review the lesson

A function can turn the name of a document into a status message. The parameter receives the value passed by the caller. Backticks create a template literal, and ${...} inserts a value into its text. Here, calling the function simulates the message an interface could show after Save.

Choose your answer+25 XP on first completion