But at least JS now has a built-in leftpad function ;) (called padStart).