Define variables, assign values and output : Number Data Type « Language Basics « JavaScript DHTML

JavaScript DHTML
1. Ajax Layer
2. Data Type
3. Date Time
4. Development
5. Document
6. Dojo toolkit
7. Event
8. Event onMethod
9. Form Control
10. GUI Components
11. HTML
12. Javascript Collections
13. Javascript Objects
14. jQuery
15. Language Basics
16. Node Operation
17. Object Oriented
18. Page Components
19. Security
20. Style Layout
21. Table
22. Utilities
23. Window Browser
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorial
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
JavaScript DHTML » Language Basics » Number Data Type 
Define variables, assign values and output

<HTML>
<BODY>
<SCRIPT language="JavaScript">
<!--
var paycheck=20;
document.write(paycheck+"<BR>");

paycheck+=2000;
document.write(paycheck+"<BR>");

paycheck=paycheck-500;
document.write(paycheck+"<BR>");

paycheck=paycheck*0;
document.write(paycheck+"<BR>");

paycheck=paycheck+500;
document.write(paycheck+"<BR>");

paycheck-=80;
document.write(paycheck+"<BR>");

//-->
</SCRIPT>

</BODY>

</HTML>
 

           
       
Related examples in the same category
1. Dividing by Zero
2. Add Four Numbers from an HTML Form (and Display the Results)
3. Add characters
4. Complex class to represent complex numbers
5. A Function That Returns the Sum of Three Numbers (Stripped-Down Version)
6.  Concatenating Variables and Displaying the Value Contained
7. JavaScript Loan Calculator
8. Factorials
9. Converting a Number to a String
10. Creating Number Objects Rather than Performing String-to-Number Conversions
11. Using toString() with Radix Values
12. Using JavaScript Integers
13. Conversion of Logical Values to Numeric Values
14. Using Floating-Point Numbers
15. Automatic Conversion between Types
16. Explicit Conversion Functions
17. Date Object Calculations
18. Operator Precedence and Different Data Types
19. Converting Base 10 to Base 16 Using Bitwise Operators
20. Number Calculation
21. Format a number
22. Format a number 2
23. Decimal to 2 Hex
w___ww__.j_av_a2s___._c_om___ | |Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.