LOL.
The Javascript engine you are running in the Pronto is circa 2008 (EcmaScript 5 - ES5) which is way before padStart was added to String.
You must resort to the old way or adding what is known as a mixin
or polyfills.
Old way:
var toPad = 1;
var padded = ("00" + toPad).substring(0,2);
A quick google (string padstart polyfill) finds this link which has exactly what you need.
[Link: vanillajstoolkit.com]If you look at this code, however, it's also looking for a 'repeat' function on String which also is not part of ES5.
Here's a link for that:
[Link: vanillajstoolkit.com]
Last edited by Lyndel McGee on June 9, 2021 12:56.