function mostCommonWord(paragraph, banned) {
  // end::description[]
  // tag::placeholder[]
  // write your code here...
  // end::placeholder[]
  // tag::solution[]
  const words = paragraph.toLowerCase().replace(/\W+/g, ' ').split(/\s+/);
  const b = new Set(banned);
  const map = words.reduce((m, w) => (b.has(w) ? m : m.set(w, 1 + (m.get(w) || 0))), new Map());
  const max = Math.max(...map.values());
  for (const [w, c] of map.entries()) if (c === max) return w;
  return '';
  // end::solution[]
  // tag::description[]
}
Find the most common word that is not banned.
@example mostCommonWord("It's blue and it's round", ['and']) // it
@param {string} paragraph - The text to sanitize and search on.
@param {string[]} banned - List of banned words (lowercase)
@returns {string} - The first word that is the most repeated.