A message after Save
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.
Understand it, then try it.
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.
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.
Track the values line by line. Predict the result before running this example in your own editor.