Learn Advanced Array Methods by Building a Statistics Calculator - Step 35

Tell us what’s happening:

can’t figure it out , don’t know what’s the problem

const getMode = (array) => {
  const counts = {};
  array.forEach(el=>counts[el] ? counts[el] += 1 : counts[el] = 1);
  return counts;

sorted thanks for not helping