×
Inicio Aleatorio

How to format numbers by prepending 0 to single-digit numbers?

Sección: Programación

Creado: 23-12-18 (Actualizado: 27-12-18)

I want to format a number to have two digits. The problem is caused when 0–9 is passed, so I need it to be formatted to 00–09.

Is there a number formatter in JavaScript?

https://stackoverflow.com/questions/8043026/how-to-format-numbers-by-prepending-0-to-single-digit-numbers

Siguiente Enlace