📌  相关文章
📜  javascript 将秒转换为分秒 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:08.143000             🧑  作者: Mango

代码示例3
const millisToMinutesAndSeconds = (millis) => {
    var minutes = Math.floor(millis / 60000);
    var seconds = ((millis % 60000) / 1000).toFixed(0);
    //ES6 interpolated literals/template literals 
      //If seconds is less than 10 put a zero in front.
    return `${minutes}:${(seconds < 10 ? "0" : "")}${seconds}`;
}