Helping ordinary people create extraordinary websites!
   

How to do calculations using JavaScript

Monday, 15th March 2010
by Toffer

Hi guys I am new to JavaScript and am looking for help trying to find out the values of the following numbers and was wondering if you could help me?

First = 6;
second = first - 4
first = 2+2 * first - second;
second = first / 2;

Any help with this would be greatfully received





More JavaScript Help:
» Preloader gif or adsense that appears before the game loads
» How to populate fields on a web form from a separate program.
» JavaScript Print
» How can I count the length of string with JavaScript?
» Phone number validation
» How can I disable my submit button if the textarea in my form is empty?
» What is the best method of form validation with JavaScript?
» How can I resize a window to a specific size using JavaScript?

SPREAD THE WORD!
Tell a Friend

GET OUR NEWS

Developer Resources