$JavaScript typing practice

Practice typing JavaScript arrow functions, destructured parameters, and template literals while formatting a list of titles and counts.

Start practice

Practice example

const formatTitles = (items) =>
  items.map(({ title, count }) => {
    return `${title} (${count})`;
  });
({ title, count }) =>
Close the object braces, then close the parameter parentheses. The equals sign comes first in the arrow.
`${title} (${count})`
Use backticks around the string and type a dollar sign right before each opening brace. The parentheses around the count are literal text.

To type this example, paste it into Your code.