I created a time function to calculate media playback time. It does not display any leading zeros. How can I display any leading zeros?
function converttoTime(timeInSeconds) { var minutes = Math.round(Math.floor(timeInSeconds / 60)); var seconds = Math.round(timeInSeconds - minutes * 60);
source share