Build a tag banner
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.
Arrays hold an ordered collection of values. map visits each tag and builds a new array from the returned values. The arrow function changes each tag to uppercase. join then places a separator between the transformed strings, making one banner while the original array keeps its own values.
const tags = ["new", "sale", "staff"];const bannerTags = tags.map(tag => tag.toUpperCase());const banner = bannerTags.join(" | ");console.log(banner);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.