I want to convert this C# code to JS:
myTimer -= Time.deltaTime;
int minutes = Mathf.FloorToInt(myTimer / 60F);
int seconds = Mathf.FloorToInt(myTimer - minutes * 60);
string niceTime = string.Format("{0:0}:{1:00}", minutes, seconds);
myLabel.text= niceTime;
Here is what I have so far:
myTimer -= Time.deltaTime; // Count down the time in seconds on timer
var minutes :int = Mathf.FloorToInt(myTimer / 60F);
var seconds :int = Mathf.FloorToInt(myTimer - minutes * 60);
string niceTime = string.Format("{0:0}:{1:00}", minutes, seconds);
I am stuck on the string formatting part, how do I write this in JS?