Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6088017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:56:12+00:00 2026-05-23T11:56:12+00:00

I think it’s time get some second opinions on the javascript I’m working on

  • 0

I think it’s time get some second opinions on the javascript I’m working on at the moment.

I’m trying to create a calculator to tell people if they can save money by using a subscription etc etc. The calculation itself is done by som inputs from the client and some prevalues from Umbraco CMS.

The result I get from the calculator at the moment is “right” in that the actual numbers are correct, but there’s just too many zeroes in it.

The calculator can be found here: my calculator

The test data I’m using is the following:

  • Antal ansatte: 4
  • Gennemsnitlig ordreværdi kr. (ca.): 400
  • Antal ordrer årligt (ca.): 5500
  • Overskudsgrad (hvad er det?): 2.7

Which gives the output: 712800.0000000001

I tried to divide this by 100 and, of course, it just moved the comma/dot two steps the left. Still there’s all those zeroes.

Any help/hint is greatly appreciated! 🙂

Thanks in advance,

Bo

P.S. The result I’m looking for would be 7128.00

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:56:13+00:00Added an answer on May 23, 2026 at 11:56 am

    I believe you want to call toFixed on your integer.

    (712800.00000001/100).toFixed(2)
    "7128.00"
    

    It will change your number into a string, but if it is for display purposes it should be fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Think Global, Act Local That's what they tell you, however during all my time
I think most people know how to do this via the GUI (right click
I think most people here understand the importance of fully automated builds. The problem
I think this is specific to IE 6.0 but... In JavaScript I add a
I think that java executables (jar files) are trivial to decompile and get the
I think this is a relatively simple problem. I wish to obtain some functionality
think this should be an easy one... I want to get the currently selected
Think its a simple one. I am working on a site. The design is
think user pressed two keys at same time . I want to be notified
think about having a skript where you have some words as input. now you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.