A
A
A person from Kazakhstan2020-05-03 06:34:56
JavaScript
A person from Kazakhstan, 2020-05-03 06:34:56

How to display a number from a tag with zeros?

I output a number from the tag, but it is a string and I want to convert it to a number, but in this case zeros are cut off.

How to output a number with zeros?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2020-05-03
@LenovoId

+number.replace(/\D/g, '')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question