How do I save it in float format in JavaScript?

Asked 2 years ago, Updated 2 years ago, 17 views

I'd like to convert float to String in JavaScript. How can I see only the second decimal place? For example, if I have 0.3445434, I want to save up to 0.34

javascript

2022-09-22 22:00

1 Answers

var result = Math.round(original*100)/100;


2022-09-22 22:00

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.