I’m pretty sure this is simple but I am trying to print out the current time in 12-hour format without including the leading zero in the time string. So, for example.
09:30 AM should print as 9:30 AM.
The current code I have so far (which prints the version with the leading zero) is this:
var d = new Date();
var timeString = d.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});
How can I change the above code to remove the leading zeros when they appear?