+ 1

I wrote a code , I want that the output contain only no not rest decimal places.please let me know how can I do it in javascript

https://code.sololearn.com/W4RWocx8u2SQ/?ref=app

27th Jun 2022, 7:38 AM
Sahil Rajpoot
2 Answers
+ 3
try this: document.write(pies.toFixed(0)); 0 means you want you want 0 numbers after the decimal point, and it rounds the number to how many numbers you want.
27th Jun 2022, 7:41 AM
ŠœŠ°Ń€Ń‚ŠøŠ½ šŸ˜‘šŸŽµ
ŠœŠ°Ń€Ń‚ŠøŠ½ šŸ˜‘šŸŽµ - avatar
27th Jun 2022, 7:43 AM
Sahil Rajpoot