Daily Coding Challenge - Mile Pace

Tell us what’s happening:

The code meets gives the desired output but still doesn’t pass

Your code so far

function averagePace(miles, timeStr) {
  const [minStr, secStr] = timeStr.split(":");
  const totalSeconds = parseInt(minStr) * 60 + parseInt(secStr);

  const avgSeconds = Math.round(totalSeconds / miles);

  const minutes = Math.floor(avgSeconds / 60).toString().padStart(2, "0");
  const seconds = (avgSeconds % 60).toString().padStart(2, "0");

  return `${minutes}:${seconds}`;
}


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36

Challenge Information:

Daily Coding Challenge - Mile Pace
https://www.freecodecamp.org/learn/daily-coding-challenge/2025-08-21

Is this the name the function originally had?

nope . but i find it difficult to work with the already present return statement

The tests can only call the function with the name that they were written to expect. If you change the name of the function, then the tests will fail.