Can I remove all ".0000" appearances on my webshop?

I am working on an e-commerce website where product specs are automatically imported from a CSV-file.

Unfortunately some of the specs have ".0000′ in addition to the main number (i.e. 40 = 40.0000)

I am a rookie with CSS/JS, but I am able to find the part where I can add custom CSS 🙂

Does anyone have a piece of code for me to hide all ".0000"?

63 thoughts on “Can I remove all ".0000" appearances on my webshop?”

  1. use parseInt built-in function to round the number to absolute one or use parseFloat to round the number:

    const number = parseInt(40.0000);

Leave a Comment