jQuery

I know enough jQuery and javascript at this point to get myself in trouble.  I have a script that is developing a figure.  I seem to be jumping through a lot of hoops to create that figure.  The following is what I have.  What I would like to know is if there is a simpler way to write the following:

<script>
              var roadside = 10;	
              var options_total = parseFloat(liabil_total) + parseFloat(med_total) + parseFloat(veh_total); 		
 			
 	//  START Final Price
 	     var pre_premium_total = parseFloat(damage_total) + parseFloat(options_total); 
             var final_premium_total = parseFloat(pre_premium_total) + parseInt(roadside);
    	     var premium_total = Math.round(final_premium_total);
    //  END Final Price
</srcipt>

Open in new window

LVL 8
rgranlundAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Phil PhillipsDevOps ArchitectCommented:
It seems simple enough to me.  If you really want to, you can combine it into one calculation, but the way you broke it up probably makes it easier to follow anyways.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.