Daily Coding Challenge - Mile Pace

Tell us what’s happening:

I’ve try on the console, it’s work, but when I try the tests it didn’t a single criteria

Your code so far

function milePace(miles, duration) {
  const regex = /[\"]+/g;
  duration = duration.split(":").map(el => parseInt(el));
  const totalDuration = (duration[0] + duration[1]/60);
  let minute = Math.floor(totalDuration/miles);
  let second = Math.floor(totalDuration%miles/miles*60);
  if(minute < 10){
    minute = `0${minute}`;
  }
  if(second < 10){
    second = `0${second}`;
  }
  return `"${minute}:${second}"`;
}

console.log(milePace(26.2, "120:35"));

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0

Challenge Information:

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

There’s no need to wrap the result in additional quotes ().