Answers for "convert minutes to seconds in javascript with input button"

0

javascript format seconds into minutes and second

function getTime(time) {
    //1:43
    // console.log(Math.floor(time % 60))
    return Math.floor(time / 60) + ':' + ('0' + Math.floor(time % 60)).slice(-2)
  }
Posted by: Guest on October-22-2021
0

how to convert seconds in hours minutes and seconds js

function convertSeconds(seconds) {
  var convert = function(x) { return (x < 10) ? "0"+x : x; }
  return convert(parseInt(seconds / (60*60))) + ":" +
         convert(parseInt(seconds / 60 % 60)) + ":" +
         convert(seconds % 60)
}
Posted by: Guest on October-12-2021

Code answers related to "convert minutes to seconds in javascript with input button"

Code answers related to "Javascript"

Browse Popular Code Answers by Language