Easy javascript

Render list of items

Problem

Map array ["React","Node","Mongo"] to list items with keys.

Hints
  • skills.map((s,i) => ...)

Your practice code

Ready — edit the code above and click Run.

Solution

const skills = ["React", "Node", "Mongo"];
const items = skills.map((s, i) => `<li key="${i}">${s}</li>`);
console.log(items.join(""));

Try solving on your own first, then reveal the official answer.

Explanation

Always provide stable key props—React uses them for efficient reconciliation.

Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details